Launching refreshed version of LLM Engineering weeks 1-4 - see README

This commit is contained in:
Edward Donner
2025-10-11 15:58:39 -04:00
parent 3286cfb395
commit c7257b9ae6
68 changed files with 16583 additions and 3756 deletions

View File

@@ -2,10 +2,27 @@
## Your 8 week journey to proficiency starts today
![Voyage](voyage.jpg)
![Voyage](assets/voyage.jpg)
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.
# IMPORTANT ANNOUNCEMENT - OCTOBER 2025 - PLEASE READ
I am phasing in new, updated versions of all the course videos, with new videos and new code. I realize this can be quite jarring for people already on the course, and I will do my best to minimize headache!
- Both video series will be available in Udemy and you can watch either. A new week should become available each week as we roll this out.
- You can follow the original videos or the new videos - either should work great. Switch between them at any time.
- The latest code is pushed to the repo. You can follow along with new code, or revert to original code.
The most significant change is that the new version uses the fabulous uv, instead of Anaconda! But there's also tons of new content, including new models, tools and techniques. Prompt caching, LiteLLM, inference techniques and so much more.
### To revert to the original version of code, consistent with the original videos (Anaconda + virtualenv)
If you'd prefer to stick with the code for the original videos, simply do this from your Anaconda Prompt or Terminal:
`git fetch`
`git checkout original`
And that's it! Any questions, please ask me on Udemy or at ed@edwarddonner.com. More details at the top of the course resources [here](https://edwarddonner.com/2024/11/13/llm-engineering-resources/).
### Before you begin
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@edwarddonner.com). It's always great to connect with people on LinkedIn to build up the community - you'll find me here:
@@ -34,11 +51,12 @@ After we do the Ollama quick project, and after I introduce myself and the cours
Hopefully I've done a decent job of making these guides bulletproof - but please contact me right away if you hit roadblocks:
- PC people please follow the instructions in [SETUP-PC.md](SETUP-PC.md)
- Mac people please follow the instructions in [SETUP-mac.md](SETUP-mac.md)
- Linux people please follow the instructions in [SETUP-linux.md](SETUP-linux.md)
NEW INSTRUCTIONS for new version of the course (rolled out October 2025): [New Setup Instructions All Platforms](setup/SETUP-NEW.md)
The are also PDF versions of the setup instructions in this folder if you'd prefer.
ORIGINAL INSTRUCTIONS for people on the version prior to October 2025:
- PC people please follow the instructions here: [Original PC instructions](setup/SETUP-PC.md)
- Mac people please follow the instructions here: [Original Mac instructions](setup/SETUP-mac.md)
- Linux people please follow the instructions here: [Original Linux instructions](setup/SETUP-linux.md)
### An important point on API costs (which are optional! No need to spend if you don't wish)
@@ -48,31 +66,7 @@ Please do monitor your API usage to ensure you're comfortable with spend; I've i
### Free alternative to Paid APIs
Early in the course, I show you an alternative if you'd rather not spend anything on APIs:
Any time that we have code like:
`openai = OpenAI()`
You can use this as a direct replacement:
`openai = OpenAI(base_url='http://localhost:11434/v1', api_key='ollama')`
And also replace model names like **gpt-4o-mini** with **llama3.2**.
For week 1 day 1, you can find this in week1/solutions/day1_with_ollama.ipynb.
Below is a full example:
```
# You need to do this one time on your computer
!ollama pull llama3.2
from openai import OpenAI
MODEL = "llama3.2"
openai = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
response = openai.chat.completions.create(
model=MODEL,
messages=[{"role": "user", "content": "What is 2 + 2?"}]
)
print(response.choices[0].message.content)
```
See [Guide 9](guides/09_ai_apis_and_ollama.ipynb) in the guides directory for the detailed approach with exact code for Ollama, Gemini, OpenRouter and more!
### How this Repo is organized
@@ -81,7 +75,7 @@ Follow the setup instructions above, then open the Week 1 folder and prepare for
### The most important part
The mantra of the course is: the best way to learn is by **DOING**. I don't type all the code during the course; I execute it for you to see the results. You should work along with me or after each lecture, 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 submit a Pull Request for your code (instructions [here](https://chatgpt.com/share/677a9cb5-c64c-8012-99e0-e06e88afd293)) and I can make your solutions available to others so we share in your progress; as an added benefit, you'll be recognized in GitHub for your contribution to the repo. While the projects are enjoyable, they are first and foremost designed to be _educational_, teaching you business skills that can be put into practice in your work.
The mantra of the course is: the best way to learn is by **DOING**. I don't type all the code during the course; I execute it for you to see the results. You should work along with me or after each lecture, 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 submit a Pull Request for your code (see the Github guide in the guides folder) and I can make your solutions available to others so we share in your progress; as an added benefit, you'll be recognized in GitHub for your contribution to the repo. While the projects are enjoyable, they are first and foremost designed to be _educational_, teaching you business skills that can be put into practice in your work.
## Starting in Week 3, we'll also be using Google Colab for running with GPUs
@@ -99,10 +93,10 @@ The colab links are in the Week folders and also here:
### Monitoring API charges
You can keep your API spend very low throughout this course; you can monitor spend at the dashboards: [here](https://platform.openai.com/usage) for OpenAI, [here](https://console.anthropic.com/settings/cost) for Anthropic and [here](https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/cost) for Google Gemini.
You can keep your API spend very low throughout this course; you can monitor spend at the dashboards: [here](https://platform.openai.com/usage) for OpenAI, [here](https://console.anthropic.com/settings/cost) for Anthropic.
The charges for the exercsies in this course should always be quite low, but if you'd prefer to keep them minimal, then be sure to always choose the cheapest versions of models:
1. For OpenAI: Always use model `gpt-4o-mini` in the code instead of `gpt-4o`
1. For OpenAI: Always use model `gpt-4.1-nano` in the code
2. For Anthropic: Always use model `claude-3-haiku-20240307` in the code instead of the other Claude models
3. During week 7, look out for my instructions for using the cheaper dataset
@@ -111,7 +105,7 @@ Please do message me or email me at ed@edwarddonner.com if this doesn't work or
<table style="margin: 0; text-align: left;">
<tr>
<td style="width: 150px; height: 150px; vertical-align: middle;">
<img src="resources.jpg" width="150" height="150" style="display: block;" />
<img src="assets/resources.jpg" width="150" height="150" style="display: block;" />
</td>
<td>
<h2 style="color:#f71;">Other resources</h2>