Awesome
Large Language Models
This repo contains the notebooks and slides for the Large Language Models: Application through Production course on edX & Databricks Academy.
<details> <summary> Notebooks</summary>How to Import the Repo into Databricks?
-
You first need to add Git credentials to Databricks. Refer to documentation here.
-
Click
<img width="400" alt="repo_1" src="https://files.training.databricks.com/images/llm/repo_1.png">Repos
in the sidebar. ClickAdd Repo
on the top right. -
Clone the "HTTPS" URL from GitHub, or copy
<img width="700" alt="add_repo" src="https://files.training.databricks.com/images/llm/add_repo.png">https://github.com/databricks-academy/large-language-models.git
and paste into the boxGit repository URL
. The rest of the fields, i.e.Git provider
andRepository name
, will be automatically populated. ClickCreate Repo
on the bottom right.
How to Import the files from .dbc
releases on GitHub
-
You can download the notebooks from a release by navigating to the releases section on the GitHub page:
<img width="400" alt="dbc_release1" src="https://files.training.databricks.com/images/llm/dbc_release1.png"> -
From the releases page, download the
<img width="400" alt="dbc_release2" src="https://files.training.databricks.com/images/llm/dbc_release2.png">.dbc
file. This contains all of the course notebooks, with the structure and meta data. -
In your Databricks workspace, navigate to the Workspace menu, click on Home and select
<img width="400" alt="dbc_release3" src="https://files.training.databricks.com/images/llm/dbc_release3.png">Import
: -
Using the import tool, navigate to the location on your computer where the
<img width="400" alt="dbc_release4" src="https://files.training.databricks.com/images/llm/dbc_release4.png">.dbc
file was dowloaded from Step 1. Once you select the file, clickImport
, and the files will be loaded and extracted to your workspace:
Which Databricks cluster should I use?
-
First, select
<img width="500" alt="single_node" src="https://files.training.databricks.com/images/llm/single_node.png">Single Node
-
This courseware has been tested on Databricks Runtime 13.3 LTS for Machine Learning. If you do not have access to a 13.3 LTS ML Runtime cluster, you will need to install many additional libraries (as the ML Runtime pre-installs many commonly used machine learning packages), and this courseware is not guaranteed to run.
<img width="400" alt="cluster" src="https://github.com/databricks-academy/large-language-models/assets/6416014/50dd3080-97d7-40ff-9eda-b91a359fa4ac">For all of the notebooks except
<img width="400" alt="cpu_settings" src="https://github.com/databricks-academy/large-language-models/assets/6416014/4c8f6e92-0400-4aba-9107-27b911dd11c1">LLM 04a - Fine-tuning LLMs
andLLM04L - Fine-tuning LLMs Lab
, you can run them on a CPU just fine. We recommend eitheri3.xlarge
ori3.2xlarge
(i3.2xlarge will have slightly faster performance).For these notebooks:
<img width="400" alt="gpu" src="https://github.com/databricks-academy/large-language-models/assets/6416014/2580d6da-f3a5-4562-9b4e-f0f4861e7c23">LLM 04a - Fine-tuning LLMs
andLLM04L - Fine-tuning LLMs Lab
, you will need the Databricks Runtime 13.3 LTS for Machine Learning with GPU.Select GPU instance type of
<img width="400" alt="gpu_settings" src="https://github.com/databricks-academy/large-language-models/assets/6416014/3934f739-458b-40db-8d96-02d5d274f58e">g5.2xlarge
.
How do I install the datasets and models locally?
-
To improve performance of the code, we highly recommend pre-installing the datasets and models by running the
LLM 00a - Install Datasets
notebook. </br> <img width="400" alt="install_datasets_file" src="https://files.training.databricks.com/images/llm/installdatasets1.png"> -
You should run this script before running any of the other notebooks. This can take up to 25mins to complete. <img width="1000" alt="install_datasets_notebook" src="https://files.training.databricks.com/images/llm/installdatasets2.png">
Where do I download course slides?
Please click the latest version under the Releases
section. You will be able to download the slides in PDF.