Master language models and embedding models through training, fine-tuning, aligning, distilling, and merging transformer architectures!
This course is no longer available.
Explore other coursesCourse overview
🧑💻 Language Model Engineering refers to the evolving set of best practices for training, fine-tuning, and aligning LLMs to optimize their use and function to balance performance with efficiency.
These best practices have formed the basis for the LLMs, or Large Language Models (a.k.a. Foundation Models) and Small Language Models (SLMs) of today.
🤖 Whether you’re looking at OpenAI’s GPT series, Anthropic Claude, Grok, Google Gemini, Mistral, or any other model provider, the core underlying transformer architectures are similar, as are the training and tuning methods.
When chasing after high scores on LLM benchmarks or creating state-of-the-art SLMs, techniques like Model Merging and Distillation are important as well.
🏫 This course will provide you with the foundational concepts and code to train, fine-tune, and align state-of-the-art SLMs and LLMs using industry-standard and emerging approaches from the open-source edge heading into 2025.
🤓 Become the expert in your organization on all things training (pretraining, post-training), fine-tuning (supervised fine-tuning, instruction tuning, chat tuning, etc.), alignment (PPO, DPO, etc.), Small Language Models (SLMs), Model Merging, Distillation, and more!
01
Data scientists, researchers, or engineers experienced with classic Machine Learning who want to build custom Small Language Models (SLMs).
02
Product managers who need to understand the core concepts and code behind custom SLMs to effectively lead their product teams.
03
Stakeholders who aim to train, fine-tune, or align proprietary SLMs for their customers in 2025.
🦾 Build, train, and evaluate Language Models using transformer variants (GPT, BERT, BART)
🧐 Calculate self-attention and understand the latest implementations (Flash Attention, FA2)
🔠 Demystify embedding layers, embedding representations, pre-trained vs. learned embeddings, ROPE, and more!
🪙 Decode embedding space representations for optimal next-token prediction
🔡 Build, train, and evaluate embedding models (like those in 🤗 Sentence Transformers)
🚇 Complete unsupervised and continued pretraining of LLMs and SLMs from scratch
🚉 Fine-tune pre-trained LMs for instruction-following, chat, and more via parameter-efficient methods
🛤️ Align LMs to balance helpfulness with harmlessness and other criteria (RLXF, DPO)
🚀 Explore frontiers of Language Models (Mixture-of- approaches, Model Merging, alternative fine-tuning, and more!)
Live sessions
Learn directly from "Dr. Greg" Loughnane & Chris "The Wiz 🪄" Alexiuk in a real-time, interactive format.
Lifetime access
Go back to course content and recordings whenever you need to.
Community of peers
Stay accountable and share insights with like-minded professionals.
Certificate of completion
Share your new skills with your employer or on LinkedIn.
Maven Guarantee
This course is backed by the Maven Guarantee. Students are eligible for a full refund up until the halfway point of the course.
78 lessons • 8 projects
Introduction to LLM Engineering and the AI Makerspace Community
Pre-Work, Session 1
Course Overview
Practical LLM Engineering in 2025
Small Language Models
How to Train Machine Learning Models: A Brief Review
Assignment: Read The Original Transformer Paper!
Learning about the OG: The Bidirectional Auto-Regressive Transformer (BART)
Pre-Work, Session 2
Tokenization
Embeddings
Positional Encoding
Feedforward Neural Networks
Loss Functions
Building and Training a BART-style transformer from scratch
Transformer Toolkit
From Self-Attention to Flash Attention and FA2
Pre-Work, Session 3
The Attention Mechanism
Queries, Keys, and Values Pairs
Flash Attention & Flash Attention 2 (FA2)
Building and training a GPT-style transformer with multi-headed attention
Attention Toolkit
Understanding embedding representations inside of the Transformer
Pre-Work, Session 3
Embedding Space Representations
Embedding Layers
Pre-Trained Embeddings
Learned Embeddings
Rotary Position Embeddings (ROPE)
Emerging Embeddings Approaches
Embeddings in Industry
Building, training, and evaluating a RoFormer vs. GPT-style transformer
Transformer Embedding Toolkit
How LLMs predict the next token, how to control token predictions
Pre-Work, Session 4
Decoding vs. Decoders
Logits = Log of the Odds
Temperature Scaling
Naive, Greedy Implementations
Guardrails: Strategies for Constraining Outputs
Speculative Decoding
Putting guardrails on next-token prediction through decoding
Decoding Toolkit
How embedding models are created, and how their architecture is changing
Pre-Work, Session 5
Embedding Models vs. Learned Embedding Layers
Sentence Transformers (SBERT)
Similarity Metrics
MTEB: Massive Text Embedding Benchmark
Advanced Embeddings: GPT-style vs. BERT-style
Embedding Models in Industry
Building, training, and evaluating an embedding model from scratch
Embedding Model Toolkit
Step 1 of Engineering an LLM: Unsupervised Pre-Training
Pre-Work, Session 6
Self-Supervised Learning
Unsupervised Pretraining
Domain-Adapted (Continued) Pretraining
In-Context Learning
Emerging Pretraining Methods
Pretraining in Industry
Byte-Pair Encoding Tokenization
Unsupervised pretraining of nanoGPT from scratch
LLM Pre-Training Toolkit
Step 2 of Engineering an LLM: Supervised Fine-Tuning (SFT)
Pre-Work, Session 7
Supervised Fine-Tuning
Instruction Tuning (e.g., Instruction Fine-Tuning)
Chat Fine-Tuning
Quantization & bitsandbytes
Parameter-Efficient Fine-Tuning (PEFT)
Low-Rank Adaptation (LoRA/QLoRA)
Emerging SFT Methods
SFT in Industry
Fine-Tuning Llama 3.1 for instruction-following and chat with PEFT-QLoRA
LLM Fine-Tuning Toolkit
Step 3 of Engineering an LLM: Alignment
Pre-Work, Session 8
Helpfulness
Harmlessness
Reinforcement Learning with Human Feedback (RLHF)
Reinforcement Learning with AI Feedback (RLAIF)
Direct Preference Optimization (DPO)
Advanced Alignment: Aspect Critiques and Emerging Techniques
Alignment in Industry
Aligning Llama 3.1 with DPO to minimize harmlessness
LLM Alignment Toolkit
From the LLM Edge: SLMs, Continued Pretraining, MoEs, Model Merging, LoRA variants, and more!
Pre-Work, Session 9
Mixture of Experts (MoEs)
Model Merging
Mixture of Judges
Emerging Architectures Beyond Transformer
Industry Outlook: LLM Engineering vs. AI Engineering
LLM Edge Toolkit
A background in fundamental Machine Learning and Deep Learning
Understanding supervised learning, unsupervised learning, and neural network architectures is required. Introductory NLP and Computer Vision knowledge is encouraged. Not sure where to start? Read this.
A ability to program in Python within a Jupyter Notebook Environment
Understand basic Python syntax and constructs. You should be comfortable training and evaluating simple ML & DL models using test, train, and dev sets. Not sure where to start? Look here.
Co-Founder & CEO @ AI Makerspace
In 2023, "The Wiz 🪄" a.k.a. "The LLM Wizard 🪄" and I created the LLM Engineering: The Foundations and LLM Ops: LLMs in Production courses. In 2024, we launched The AI Engineering Bootcamp.
From 2021-2023 I led the product & curriculum team at FourthBrain (Backed by Andrew Ng's AI Fund) to build industry-leading online bootcamps in ML Engineering and ML Operations (MLOps).
Previously, I worked as an AI product manager, university professor, data science consultant, AI startup advisor, and ML researcher; TEDx & keynote speaker, lecturing since 2013.
👨🏫 Learn with us free on YouTube!
👨💼 Connect with me on LinkedIn!
Co-Founder & CTO @ AI Makerspace
During the day, I work as a Developer Advocate for NVIDIA. Previously, I worked with Greg at FourthBrain (Backed by Andrew Ng's AI Fund) on MLE and MLOps courses, and on a few Deeplearning.ai events!
A former founding MLE and data scientist, these days you can find me cranking out Machine Learning and LLM content!
My motto is "Build, build, build!", and I'm excited to get building with all of you!
👨🏫 YouTube: AI Makerspace Official, My Personal
👨💼 Connect with me on LinkedIn!
4-6 hours per week
Class!
Tuesdays & Thursdays, 4:00-6:00pm PT
Weekly Programming Projects
2-4 hours per week
Each class period, we will get hands-on with Python coding homework!
Office Hours
Tuesdays and Fridays
Dr. Greg: Thursdays @ 8 AM PT
The Wiz 🪄: Fridays @ 3 PM PT
Peer Support Sessions
Varies
Peers supporters are here to serve as your destination group; they're available for homework help, concept deep dives, and to hang out with!
Find them live in class, on Discord, and even in their own dedicated weekly sessions!
Hands-on learning at the LLM edge
We teach concepts AND code. Never one or the other. AI has accelerated so quickly that anyone who's been a manager the last few years has not yet seen the code for themselves.
Pair programming made fun and easy
Grow your network. Build, ship, and share with a community! Build relationships with peers and instructional staff to unlock opportunities in the years ahead.
Find fellow travelers for your journey
Join a community of like-minded AI practitioners who are all in on Generative AI, and who are heading down the same career path as you are.