Fine-Tuning Open Weight Large Language Models
Published by O'Reilly Media, Inc.
Get the most out of BERT, Llama, and Mistral and tailor them to your needs
Course outcomes
- Learn how to work with LLMs
- Discover your appropriate base LLM
- Understand how to fine-tune models
Course description
The release of Meta's Llama model has proven to be the big bang of open source large language models, and a lot of work has been invested by the ML community to fine-tune the model to specific needs for tasks such as question answering or for chatbots.
Join expert Christian Winkler to get a structured and accessible introduction to fine-tuning open source LLMs. You’ll fine-tune your own model and adapt the base model to your functional needs (like question answering or domain-specific vocabulary) with code presented in the course along with a GitHub repo. You’ll discover how these models can also excel on less powerful hardware by using new approaches to quantization.
What you’ll learn and how you can apply it
- Understand the different types of LLMs and their limitations
- Get an insight into transfer learning and how it relates to fine-tuning
- Understand the challenges related to fine-tuning
- Perform fine-tuning for the different types of LLMs
- Know about possible hardware scenarios
This live event is for you because...
- You’re a data scientist, ML engineer, or NLP developer.
- You want to adapt LLMs to your specific needs.
- ChatGPT is not enough for you.
Prerequisites
- Working knowledge of Python and Jupyter Notebooks
- Basic understanding of machine learning
- Familiarity with Hugging Face Transformers (helpful but not required)
Recommended preparation:
- Set up a Google Colab account (for local installations a powerful GPU is necessary)
Recommended follow-up:
- Take Fundamentals of Large Language Models (live online course with Jonathan Fernandes)
- Read Natural Language Processing with Transformers (book)
- Read Hands-On Large Language Models (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Short introduction to LLMs (30 minutes)
- Group discussion: Which open-source LLMs are you using?
- Presentation: BERT-like models (classification, inference, embeddings); GPT-like models (text generation); transfer learning (basis for fine-tuning)
- Q&A
Fine-tuning BERT models (60 minutes)
- Group discussion: Who has fine-tuned models? How long does it take to fine-tune models?
- Presentation: Classification; embeddings
- Hands-on exercises: Fine-tune a BERT model; fine-tune an embeddings model with SBERT
- Q&A
Fine-tuning GPT models (120 minutes)
- Presentation: LoRA and PEFT; fine-tuning with Hugging Face transformers; fine-tuning with Axolotl and Unsloth frameworks
- Hands-on exercises: Fine-tune using the Hugging Face software; use Axolotl and Unsloth frameworks
- Q&A
Hardware (30 minutes)
- Group discussion: Where do you want to run your models?; Which hardware is most suitable for your usage scenario?
- Presentation: Running on CPUs; running on GPUs (local or cloud); running on Apple hardware
- Q&A
Your Instructor
Christian Winkler
Christian Winkler has worked with large amounts of data for several decades, and specializes in advanced analytics. As a professor at the Technical University of Applied Science in Nuremberg, he concentrates his research on optimizing user experience using modern data-based approaches. He researches and publishes articles about data management and large language models and is a regular contributor to machine learning conferences.
Skills covered
- Large Language Models (LLMs)
- Prompt Engineering