Browse Source

Wording fixes

pull/178/head
Edward Donner 3 months ago
parent
commit
b5f0cd7905
  1. 4
      README.md
  2. 11
      SETUP-PC.md
  3. BIN
      SETUP-PC.pdf
  4. 11
      SETUP-mac.md
  5. BIN
      SETUP-mac.pdf
  6. 18
      week1/Intermediate Python.ipynb
  7. 24
      week1/day1.ipynb
  8. 21
      week1/troubleshooting.ipynb

4
README.md

@ -6,7 +6,7 @@
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.
### A note before you begin
### 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:
https://www.linkedin.com/in/eddonner/
@ -17,6 +17,8 @@ https://edwarddonner.com/2024/11/13/llm-engineering-resources/
## Instant Gratification instructions for Week 1, Day 1
### Important note: see my warning about Llama3.3 below - it's too large for home computers! Stick with llama3.2! Several students have missed this warning...
We will start the course by installing Ollama so you can see results immediately!
1. Download and install Ollama from https://ollama.com noting that on a PC you might need to have administrator permissions for the install to work properly
2. On a PC, start a Command prompt / Powershell (Press Win + R, type `cmd`, and press Enter). On a Mac, start a Terminal (Applications > Utilities > Terminal).

11
SETUP-PC.md

@ -13,6 +13,17 @@ I use a platform called Anaconda to set up your environment. It's a powerful too
Having said that: if you have any problems with Anaconda, I've provided an alternative approach. It's faster and simpler and should have you running quickly, with less of a guarantee around compatibility.
### Before we begin - Heads up!
If you are relatively new to using the Command Prompt, here is an excellent [guide](https://chatgpt.com/share/67b0acea-ba38-8012-9c34-7a2541052665) with instructions and exercises. I'd suggest you work through this first to build some confidence.
There are 4 common gotchas to developing on Windows to be aware of:
1. Permissions. Please take a look at this [tutorial](https://chatgpt.com/share/67b0ae58-d1a8-8012-82ca-74762b0408b0) on permissions on Windows
2. Anti-virus, Firewall, VPN. These can interfere with installations and network access; try temporarily disabling them as needed
3. The evil Windows 260 character limit to filenames - here is a full [explanation and fix](https://chatgpt.com/share/67b0afb9-1b60-8012-a9f7-f968a5a910c7)!
4. If you've not worked with Data Science packages on your computer before, you might need to install Microsoft Build Tools. Here are [instructions](https://chatgpt.com/share/67b0b762-327c-8012-b809-b4ec3b9e7be0).
### Part 1: Clone the Repo
This gets you a local copy of the code on your box.

BIN
SETUP-PC.pdf

Binary file not shown.

11
SETUP-mac.md

@ -13,6 +13,14 @@ I use a platform called Anaconda to set up your environment. It's a powerful too
Having said that: if you have any problems with Anaconda, I've provided an alternative approach. It's faster and simpler and should have you running quickly, with less of a guarantee around compatibility.
### Before we begin
If you're less familiar with using the Terminal, please review this excellent [guide](https://chatgpt.com/canvas/shared/67b0b10c93a081918210723867525d2b) for some details and exercises.
If you're new to developing on your Mac, you may need to install XCode developer tools. Here are [instructions](https://chatgpt.com/share/67b0b8d7-8eec-8012-9a37-6973b9db11f5).
One "gotcha" to keep in mind: if you run anti-virus software, VPN or a Firewall, it might interfere with installations or network access. Please temporarily disable if you have problems.
### Part 1: Clone the Repo
This gets you a local copy of the code on your box.
@ -49,10 +57,11 @@ If this Part 2 gives you any problems, there is an alternative Part 2B below tha
- Download Anaconda from https://docs.anaconda.com/anaconda/install/mac-os/
- Double-click the downloaded file and follow the installation prompts. Note that it takes up several GB and take a while to install, but it will be a powerful platform for you to use in the future.
- After installing, you'll need to open a fresh, new Terminal to be able to use it (and you might even need to restart).
2. **Set up the environment:**
- Open a new Terminal (Applications > Utilities > Terminal)
- Open a **new** Terminal (Applications > Utilities > Terminal)
- Navigate to the "project root directory" using `cd ~/Documents/Projects/llm_engineering` (replace this path as needed with the actual path to the llm_engineering directory, your locally cloned version of the repo). Do `ls` and check you can see subdirectories for each week of the course.
- Create the environment: `conda env create -f environment.yml`
- Wait for a few minutes for all packages to be installed - in some cases, this can literally take 20-30 minutes if you've not used Anaconda before, and even longer depending on your internet connection. Important stuff is happening! If this runs for more than 1 hour 15 mins, or gives you other problems, please go to Part 2B instead.

BIN
SETUP-mac.pdf

Binary file not shown.

18
week1/Intermediate Python.ipynb

@ -50,6 +50,22 @@
"https://chatgpt.com/share/673b553e-9d0c-8012-9919-f3bb5aa23e31"
]
},
{
"cell_type": "markdown",
"id": "f9e0f8e1-09b3-478b-ada7-c8c35003929b",
"metadata": {},
"source": [
"## With this in mind - understanding NameErrors in Python\n",
"\n",
"It's quite common to hit a NameError in python. With foundational knowledge, you should always feel equipped to debug a NameError and get to the bottom of it.\n",
"\n",
"If you're unsure how to fix a NameError, please see this [initial guide](https://chatgpt.com/share/67958312-ada0-8012-a1d3-62b3a5fcbbfc) and this [second guide with exercises](https://chatgpt.com/share/67a57e0b-0194-8012-bb50-8ea76c5995b8), and work through them both until you have high confidence.\n",
"\n",
"There's some repetition here, so feel free to skip it if you're already confident.\n",
"\n",
"## And now, on to the code!"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -57,7 +73,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Next let's create some things:\n",
"# First let's create some things:\n",
"\n",
"fruits = [\"Apples\", \"Bananas\", \"Pears\"]\n",
"\n",

24
week1/day1.ipynb

@ -5,7 +5,7 @@
"id": "d15d8294-3328-4e07-ad16-8a03e9bbfdb9",
"metadata": {},
"source": [
"# Instant Gratification\n",
"# YOUR FIRST LAB! Please read this - this is super-critical to get you prepared - no fluff!\n",
"\n",
"## Your first Frontier LLM Project!\n",
"\n",
@ -23,6 +23,11 @@
"\n",
"I've written a notebook called [Guide to Jupyter](Guide%20to%20Jupyter.ipynb) to help you get more familiar with Jupyter Labs, including adding Markdown comments, using `!` to run shell commands, and `tqdm` to show progress.\n",
"\n",
"## If you're new to the Command Line\n",
"\n",
"Please see these excellent guides: [Command line on PC](https://chatgpt.com/share/67b0acea-ba38-8012-9c34-7a2541052665) and [Command line on Mac](https://chatgpt.com/canvas/shared/67b0b10c93a081918210723867525d2b). \n",
"Linux people, something tells me you could teach _me_ a thing or two about the command line!\n",
"\n",
"## If you'd prefer to work in IDEs\n",
"\n",
"If you're more comfortable in IDEs like VSCode or Pycharm, they both work great with these lab notebooks too. \n",
@ -65,7 +70,7 @@
" </td>\n",
" <td>\n",
" <h2 style=\"color:#f71;\">Treat these labs as a resource</h2>\n",
" <span style=\"color:#f71;\">I push updates to the code regularly. When people ask questions or have problems, I incorporate it in the code, adding more examples or improved commentary. As a result, you'll notice that the code below isn't identical to the videos. Everything from the videos is here; but in addition, I've added more steps and better explanations. Consider these labs like an interactive book that accompany the lectures.\n",
" <span style=\"color:#f71;\">I push updates to the code regularly. When people ask questions or have problems, I incorporate it in the code, adding more examples or improved commentary. As a result, you'll notice that the code below isn't identical to the videos. Everything from the videos is here; but in addition, I've added more steps and better explanations, and occasionally added new models like DeepSeek. Consider this like an interactive book that accompanies the lectures.\n",
" </span>\n",
" </td>\n",
" </tr>\n",
@ -159,21 +164,6 @@
"# If it STILL doesn't work (horrors!) then please see the Troubleshooting notebook in this folder for full instructions"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36647a1c-9970-4486-81e0-7c41e81e18cf",
"metadata": {},
"outputs": [],
"source": [
"api_key = \"sk-proj-3gfz2-gil9zs21dE-xMJQXQ5pp_Kciz9Almshfes53gu76b5R2k1Dd7o8H_53xeDPKcfxSr6X4T3BlbkFJx\"\n",
"api_key += \"o7n3Cgwb04tLnlGz2NMtT9H4TZQ4Jjm8XUJQxBdZ7sqjR7hm3fJ5KSX0r45jnzJR3jUROSBDwRMA\"\n",
"openai = OpenAI(api_key=api_key)\n",
"message = \"Hello, GPT! This is my first ever message to you! Hi!\"\n",
"response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=[{\"role\":\"user\", \"content\":message}])\n",
"print(response.choices[0].message.content)"
]
},
{
"cell_type": "markdown",
"id": "442fc84b-0815-4f40-99ab-d9a5da6bda91",

21
week1/troubleshooting.ipynb

@ -57,6 +57,25 @@
" print(f\"Failed to connect with this error: {e}\")"
]
},
{
"cell_type": "markdown",
"id": "d91da3b2-5a41-4233-9ed6-c53a7661b328",
"metadata": {},
"source": [
"## Another mention of occasional \"gotchas\" for PC people\n",
"\n",
"There are 4 snafus on Windows to be aware of: \n",
"1. Permissions. Please take a look at this [tutorial](https://chatgpt.com/share/67b0ae58-d1a8-8012-82ca-74762b0408b0) on permissions on Windows\n",
"2. Anti-virus, Firewall, VPN. These can interfere with installations and network access; try temporarily disabling them as needed\n",
"3. The evil Windows 260 character limit to filenames - here is a full [explanation and fix](https://chatgpt.com/share/67b0afb9-1b60-8012-a9f7-f968a5a910c7)!\n",
"4. If you've not worked with Data Science packages on your computer before, you might need to install Microsoft Build Tools. Here are [instructions](https://chatgpt.com/share/67b0b762-327c-8012-b809-b4ec3b9e7be0).\n",
"\n",
"## And for Mac people\n",
"\n",
"1. If you're new to developing on your Mac, you may need to install XCode developer tools. Here are [instructions](https://chatgpt.com/share/67b0b8d7-8eec-8012-9a37-6973b9db11f5).\n",
"2. As with PC people, Anti-virus, Firewall, VPN can be problematic. These can interfere with installations and network access; try temporarily disabling them as needed"
]
},
{
"cell_type": "markdown",
"id": "f5190688-205a-46d1-a0dc-9136a42ad0db",
@ -64,7 +83,7 @@
"source": [
"# Step 1\n",
"\n",
"Try running the next 2 cells (click in the cell under this one and hit shift+return, then shift+return again).\n",
"Try running the next cell (click in the cell under this one and hit shift+return).\n",
"\n",
"If this gives an error, then you're likely not running in an \"activated\" environment. Please check back in Part 5 of the SETUP guide for [PC](../SETUP-PC.md) or [Mac](../SETUP-mac.md) for setting up the Anaconda (or virtualenv) environment and activating it, before running `jupyter lab`.\n",
"\n",

Loading…
Cancel
Save