This repo has companion code for my class on comparing and training LLMs.
The resources are here
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 ([email protected]). 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/
If you'd like to go more deeply into LLMs and Agents:
- I'm running a number of Live Events with O'Reilly and Pearson
- I also have a comprehensive, hands-on 8-week Mastering LLM engineering course that builds an entire Agentic AI platform from the ground up, including RAG and fine-tuning.
In the first section, we use Ollama to run a model locally
- 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
- 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). - Run
ollama run llama3.2
or for smaller machines tryollama run llama3.2:1b
- If this doesn't work, you may need to run
ollama serve
in another Powershell (Windows) or Terminal (Mac), and try step 3 again - And if that doesn't work on your box, I've set up this on the cloud. This is on Google Colab, which will need you to have a Google account to sign in, but is free: https://colab.research.google.com/drive/1-_f5XZPsChvfU1sJ0QqCePtIuc55LSdu?usp=sharing
Any problems, please contact me!
Now on to the main setup:
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
- Mac people please follow the instructions in SETUP-mac.md
- Linux people, the Mac instructions should be close enough!
During this example project, I'll suggest you try out the leading models at the forefront of progress, known as the Frontier models. These services have some charges, but I'll keep cost minimal - like, a few cents at a time. And I'll provide alternatives if you'd prefer not to use them.
Please do monitor your API usage to ensure you're comfortable with spend; I've included links below. There's no need to spend anything more than a couple of dollars. Some AI providers such as OpenAI require a minimum credit like $5 or local equivalent; we should only spend a fraction of it, and you'll have plenty of opportunity to put it to good use in your own projects. But it's not necessary in the least; the important part is that you focus on learning.
The best way to learn is by DOING. I don't type all the code during the workshop; I execute it for you to see the results. You should work through afterwards, running each cell, inspecting the objects to get a detailed understanding of what's happening. Then tweak the code and make it your own.
You can keep your API spend very low; you can monitor spend at the dashboards: here for OpenAI, here for Anthropic and here for Google Gemini.
The charges for the exercises 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:
- For OpenAI: Always use model
gpt-4o-mini
in the code instead ofgpt-4o
- For Anthropic: Always use model
claude-3-haiku-20240307
in the code instead of the other Claude models
Please do message me or email me at [email protected] if this doesn't work or if I can help with anything. I can't wait to hear how you get on.
I've put together this webpage with useful resources. https://edwarddonner.com/2024/06/26/choosing-the-right-llm-resources/ Please keep this bookmarked, and I'll continue to add more useful links there over time. |