Giter VIP home page Giter VIP logo

large-language-models's Introduction

Large Language Models

This repo contains the notebooks and slides for the Large Language Models: Application through Production course on edX & Databricks Academy.

Notebooks

How to Import the Repo into Databricks?

  1. You first need to add Git credentials to Databricks. Refer to documentation here.

  2. Click Repos in the sidebar. Click Add Repo on the top right.

    repo_1
  3. Clone the "HTTPS" URL from GitHub, or copy https://github.com/databricks-academy/large-language-models.git and paste into the box Git repository URL. The rest of the fields, i.e. Git provider and Repository name, will be automatically populated. Click Create Repo on the bottom right.

    add_repo

How to Import the files from .dbc releases on GitHub

  1. You can download the notebooks from a release by navigating to the releases section on the GitHub page:

    dbc_release1
  2. From the releases page, download the .dbc file. This contains all of the course notebooks, with the structure and meta data.

    dbc_release2
  3. In your Databricks workspace, navigate to the Workspace menu, click on Home and select Import:

    dbc_release3
  4. Using the import tool, navigate to the location on your computer where the .dbc file was dowloaded from Step 1. Once you select the file, click Import, and the files will be loaded and extracted to your workspace:

    dbc_release4
Cluster settings

Which Databricks cluster should I use?

  1. First, select Single Node

    single_node
  2. 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.

    cluster

    For all of the notebooks except LLM 04a - Fine-tuning LLMs and LLM04L - Fine-tuning LLMs Lab, you can run them on a CPU just fine. We recommend either i3.xlarge or i3.2xlarge (i3.2xlarge will have slightly faster performance).

    cpu_settings

    For these notebooks: LLM 04a - Fine-tuning LLMs and LLM04L - Fine-tuning LLMs Lab, you will need the Databricks Runtime 13.3 LTS for Machine Learning with GPU.

    gpu

    Select GPU instance type of g5.2xlarge.

    gpu_settings
Install datasets and models

How do I install the datasets and models locally?

  1. To improve performance of the code, we highly recommend pre-installing the datasets and models by running the LLM 00a - Install Datasets notebook.
    install_datasets_file

  2. You should run this script before running any of the other notebooks. This can take up to 25mins to complete. install_datasets_notebook

Slides

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.

large-language-models's People

Contributors

brookewenig avatar chengyineng38 avatar conorbmurphy avatar daboncanplay avatar sjr-db avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

large-language-models's Issues

Module 3 Q and A Lab

This lab uses the CharacterTextSplitter which splits based on a separator not on chunk_size and chunk_overlap we need to either remove those or use the TokenTextSplitter

Deprecated models in LLM 03

In LLM 03, we call models that have now been deprecated by OpanAI so that the commands fail when we run them.

This is the case in the demo where we define a call to text-babbage-001 which OpenAI says should now be replaced with gpt-3.5-turbo-instruct.

Further down in the Agents section, we use

from langchain.llms import OpenAI
llm = OpenAI()

which defaults to calling text-davinci-003 which is also deprecated and should be replaced by gpt-3.5-turbo-instruct.

Should let the user know about potential issues with map_rerank chain type in 03L

In LLM 03L - Building LLM Chains Lab notebook - Question 3, when the user tries map_rerank chain type, the model we use ('google/flan-t5-large') may not be powerful enough to consistently generate scores that can be parsed by the default parser in the default prompt in order for the results to be ranked.

The student may see error messages like

Could not parse output: [score between 0 and 100]

There are similar reports of this issue on langchain langchain-ai/langchain#3970

Broken dataset in LLM 04

In LLM 04 demo, we call imdb_ds = load_dataset("imdb") as our fine-tuning dataset.
It looks like there was an update to this dataset, and this line will throw an error ExpectedMoreSplits: {'unsupervised'}.

This can be fixed by forcing a re-install of the latest version of Hugging Face's datasets library. However doing so breaks the code further down where it can't find the train and validation splits in the dataset object.

Offline Access

Hi

Really comprehensive contents.
Can you please share if we can run all notebooks offline / without Internet connection after initial model download?

And is there any API access needed to run notebooks in this course?

Thank you

DA.reset_lesson() error

When I run

%run ../Includes/Classroom-Setup

for the first time, and I received errors. I looked inside the code, it was at the line "DA.reset_lesson()". I was able to bypass this by commenting out this line, since it was the first time running the code, there's no need to reset anything. But I think it may be helpful to provide the feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.