I'm so happy you're joining me on this path. We'll be building immensely satisfying projects in the coming weeks. Some will be easy, some will be challenging, many will ASTOUND you! The projects build on each other so you develop deeper and deeper expertise each week. One thing's for sure: you're going to have a lot of fun along the way.
I'm here to help you be most successful with your learning! If you hit any snafus, or if you have any ideas on how I can improve the course, please do reach out in the platform or by emailing me direct (ed at edwarddonner dot com). It's always great to connect with people on LinkedIn to build up the community - you'll find me here:
https://www.linkedin.com/in/eddonner/
I'm still polishing up the last couple of weeks of code, but it's looking really terrific and I'll push it in the coming days.
There are folders for each of the "weeks", representing modules of the class.
Follow the setup instructions below, then open the Week 1 folder and prepare for joy.
The mantra of the course is: the best way to learn is by DOING. You should work along with me, running each cell, inspecting the objects to get a detailed understanding of what's happening. Then tweak the code and make it your own. There are juicy challenges for you throughout the course. I'd love it if you wanted to push your code so I can follow along with your progress, and I can make your solutions available to others so we share in your progress.
By far the recommended approach is to use Anaconda for your environment. Even if you've never used it before, it makes such a difference. Anaconda ensures that you're working with the right version of Python and all your packages are compatible with mine, even if we're on different platforms.
Clone this repo by clicking on the dropdown in the green 'Code' button in Github, copying the URL to the clip board, and entering git clone <url>
in your terminal.
Then if you've not used Anaconda before, install it for your platform. You will thank me! It's the best.
Link to install Anaconda:
https://docs.anaconda.com/anaconda/install/
- Create a new Anaconda environment for this project. It's like virtualenv, only infinitely better.
conda env create -f environment.yml
- Activate the environment:
conda activate llms
- Start your Jupyter Lab
jupyter lab
- Get a celebratory cup of coffee and prepare for coding!
Particularly during weeks 1 and 2 of the course, you'll be writing code to call the APIs of Frontier models. You'll need to join me in setting up accounts and API keys.
- GPT API from OpenAI
- Claude API from Anthropic
- Gemini API from Google
Initially we'll only use OpenAI, so you can start with that, and we'll cover the others soon afterwards.
Later in the course you'll be using a HuggingFace account, which is available for free at https://huggingface.co - you'll need to create an API token from the Avatar menu >> Settings >> Access Tokens.
When you have these keys, please create a new file called .env
in your project root directory.
It should have contents like this:
OPENAI_API_KEY=xxxx
GOOGLE_API_KEY=xxxx
ANTHROPIC_API_KEY=xxxx
HF_TOKEN=xxxx
This file is listed in the .gitignore
file, so it won't get checked in and your keys stay safe.
The colab links are in the Week folders and also here:
- For week 3 day 1, this Google Colab shows what colab can do
- For week 3 day 2, here is a colab for the HuggingFace pipelines API
- For week 3 day 3, here's the colab on Tokenizers
- For week 3 day 4, we go to a colab with HuggingFace models
- For week 3 day 5, we return to colab to make our Meeting Minutes product
Well if you must! Just be sure to be running python 3.11, or we might hit compatibility snags.
Here are the steps:
After cloning the repo:
- Create a new virtual environment using something like
python3 -m venv /path/to/new/virtual/environment
- Activate the virtual environment with
source /path/to/new/virtual/environment/bin/activate
- Create a file called
.env
in the project root directory (this is .gitignored) and add any private API keys, such as below.
OPENAI_API_KEY=xxxx
GOOGLE_API_KEY=xxxx
ANTHROPIC_API_KEY=xxxx
HF_TOKEN=xxxx
- From the repo root directory, run
pip install -r requirements.txt
- Run
jupyter lab
to launch Jupyter and head over to the intro folder to get started.
Let me know if you hit problems, and try looking in the environment.yml file to see if there are clues for any other packages that need to be installed in your system. Or... try Anaconda!!