Get hands-on with Llama 4 family of models, understand its Mixture-of-Experts (MOE) architecture, and how to build applications with its official API.
Building with Llama 4
Instructor: Amit Sangani
Earn an accomplishment with PRO · Updated Oct 7, 2025

- Beginner
- 1h12m
- 9 Video Lessons
- 6 Code Examples
- 1 Graded Assignment PRO
- Earn an accomplishment with PRO
- Updated Oct 7, 2025
- Instructor: Amit Sangani
Meta- Learn more aboutMembership PRO Plan
What you'll learn
Apply Llama 4’s capabilities across multi-image reasoning, image grounding to identify objects and their bounding boxes, and querying over long-context texts of up to 1 million tokens.
Use Llama 4’s prompt optimization tool to automatically refine system prompts and its synthetic data kit to create high-quality datasets for fine-tuning.
Course recap
PROThis course, built in partnership with Meta, covers the Llama 4 family of open models featuring Mixture of Experts (MoE) architecture, native multimodal support, and massive context windows (1M tokens for Maverick, 10M for Scout). It teaches practical skills including multimodal image reasoning, image grounding, long-context processing, and two new Llama Tools: the Prompt Optimization tool (powered by DSPy) and the Synthetic Data Kit for dataset creation.
Concept map
Key concepts
- Mixture of Experts (MoE)Architecture where only a subset of model parameters are activated per input, enabling efficient serving of large models
- Long context processingUp to 10M tokens (Scout) enabling analysis of entire codebases and books without chunking
- Image groundingDetecting and localizing objects within images with bounding box precision
- Prompt EngineeringAutomated prompt optimization using DSPy optimizer with evaluation metrics
- Synthetic data generationCreating, curating, and saving high-quality training data for fine-tuning
About this course
Introducing Building with Llama 4, a short course, created in collaboration with Meta and taught by Amit Sangani, Director of Partner Engineering for Meta’s AI team.
Meta’s new Llama 4 has added three new models and introduced a Mixture-of-Experts (MOE) architecture to its family of models, making them more efficient to serve.
In this course, you’ll work with two of the three new models introduced in Llama 4. First is “Maverick” a 400-billion parameter model, with 128 experts and 17 billion active parameters. Second is “Scout,” a 109-billion parameter model with 16 experts and 17 billion active parameters. Both Maverick and Scout support long context windows, of up to a million tokens and 10 million tokens respectively. The latter is enough to support very large GitHub repos for analysis.
In hands-on lessons, you’ll build apps using Llama 4’s long-context and its new multi-modal capabilities including reasoning across multiple images and “image grounding,” in which you can identify elements and reason within specific image regions. You’ll also learn about Llama’s newest tools: its prompt optimization tool that automatically improves system prompts, and synthetic data kit that generates high-quality datasets to fine-tune your model.
In detail, you’ll:
- Get an overview of Llama 4 models, how it evolved from Llama 2, and how it’s built on Mixture-of-Expert architecture.
- Use Meta’s official Llama API, now available for free in limited preview for US-based developers, to experiment with the new model’s capabilities, and build a translator chatbot that works across all the 12 languages Llama 4 supports.
- Work through several image reasoning and grounding examples such as detecting objects and their bounding boxes, and translating UI screenshots into executable code using Llama 4 via Meta’s Llama API as well as Llama 4 hosted on Together.ai.
- Understand Llama 4 special token and raw prompt format for both text-only and multimodal prompts.
- Learn how to work with long contexts of up to 10 million tokens, and ask questions across large text files, such as entire books, research papers, and GitHub repositories using Llama 4 on Together.ai.
- Automatically improve your system prompts in sentiment analysis and categorization use cases with Llama’s new prompt optimization tool.
- Use the synthetic data kit to ingest, create, curate, and save high-quality datasets for training and fine-tuning.
By the end of the course, you’ll confidently choose and call the right Llama 4 model and build production-ready features that span text, images, and massive context.
The open Llama 4 family of models is an important component of any GenAI Developer Toolkit. If you need an open model to extend, fine-tune, and customize, Llama is a top option and this course can help you learn what you can build with it.
Who should join?
Anyone who wants hands-on experience building with the Llama 4 family of models.
Course Outline
9 Lessons・6 Code Examples- IntroductionVideo・3m
- Overview of Llama 4Video・6m
- Quickstart with Llama 4 and APIVideo with Code Example・6m
- Image GroundingVideo with Code Example・9m
- Llama 4 Prompt FormatVideo with Code Example・8m
- Long-Context UnderstandingVideo with Code Example・7m
- Prompt Optimization ToolVideo with Code Example・10m
- Synthetic Data kitVideo with Code Example・7m
- ConclusionVideo・1m
- Quiz
Graded・Quiz
・10m


Elevate your learning experience with Pro
Upgrade to Pro and gain unlimited accomplishments on your resume
Instructor
Course access is free for a limited time during the DeepLearning.AI learning platform beta!
Want to learn more about Generative AI?
Keep learning with updates on curated AI news, courses, and events, as well as Andrew’s thoughts from DeepLearning.AI!

