/llama2_oreilly_live_training

Repository for the oreilly live training course: "Getting Started with Llama2"

Primary LanguageJupyter Notebook

OReilly Live-Training: "Getting Started with Llama2"

Repository for the oreilly live training course: "Getting Started with Llama2": https://learning.oreilly.com/live-events/getting-started-with-llama-2/0636920098588/

Setup

Conda

  • Install anaconda
  • This repo was tested on a Mac with python=3.10.
  • Create an environment: conda create -n oreilly-llama2 python=3.10
  • Activate your environment with: conda activate oreilly-llama2
  • Install requirements with: pip install -r requirements/requirements.txt
  • Setup your openai API key

Pip

  1. Create a Virtual Environment: Navigate to your project directory. Make sure you hvae python3.10 installed! If using Python 3's built-in venv:

    python -m venv oreilly-llama2

    If you're using virtualenv:

    virtualenv oreilly-llama2
  2. Activate the Virtual Environment:

    • On Windows:
      .\oreilly-llama2\Scripts\activate
    • On macOS and Linux:
      source oreilly-llama2/bin/activate
  3. Install Dependencies from requirements.txt:

    pip install python-dotenv
    pip install -r requirements/requirements.txt
  4. Setup your openai API key

Remember to deactivate the virtual environment once you're done by simply typing:

deactivate

Setup your .env file

  • Change the .env.example file to .env and add your OpenAI API key.

To use this Environment with Jupyter Notebooks:

  • pip install jupyter
  • python3 -m ipykernel install --user --name=oreilly-llama2

Notebooks

Here are the notebooks available in the notebooks/ folder:

  1. Getting Started with Llama 2

    Open In Colab

  2. Hello Llama Local

    Open In Colab

  3. Ollama Quick Setup

    Open In Colab

  4. Query Docs with Llama 2

    Open In Colab

  5. LangChain Llama2 QA CSV

    Open In Colab

  6. Quiz from Source Llama2 - Llama Index

    Open In Colab

  7. Structured Output Langchain Llama2

    Open In Colab

  8. Fine Tuning Llama2

    Open In Colab

  9. Quantization Basics

    [Open In Colab](https://colab.research.google.com/github/

  10. Fine Tuning Llama2

    Open In Colab