Finetuning Large Language Models

by DeepLearning.AI

IntermediateCourseFree~1 hour 35 minutes, self-paced (9 lessons plus a quiz)

Ninety-five minutes on whether to fine-tune at all, and how to if the answer is yes.

Start LearningAdded Jul 4, 2026 · Updated Aug 5, 2026

Overview

A short DeepLearning.AI course, taught by Sharon Zhou with Andrew Ng, that answers the question most teams get wrong first: whether to fine-tune at all. It runs about ninety-five minutes across nine lessons, six of which pair a video with a runnable notebook. The opening lab compares a non-finetuned meta-llama/Llama-2-7b-hf against the finetuned Llama-2-7b-chat-hf and ChatGPT on identical prompts, which makes the difference between a base and an instruction-tuned model concrete before any training happens. Later lessons place fine-tuning against prompt engineering and retrieval, then cover instruction fine-tuning, data preparation, the training process itself, and evaluation and iteration, the last being the part most fine-tuning tutorials omit entirely. The labs use Lamini's llama Python package and its BasicModelRunner abstraction, which keeps the code short but means you are learning the concepts through a hosted wrapper rather than raw Transformers training loops, so budget extra time to port what you learn onto a stack you control. Sharon Zhou was co-founder and CEO of Lamini when the course was recorded and is listed by DeepLearning.AI as Vice President of Artificial Intelligence at AMD. The course is free on the DeepLearning.AI platform, is rated intermediate, and assumes Python familiarity plus an understanding of a deep learning framework such as PyTorch. Community-maintained copies of the lab notebooks are on GitHub if you want to read the code before enrolling.

At a Glance

Topic
Fine-Tuning
Level
Intermediate
Format
Course
Cost
Free
Duration
~1 hour 35 minutes, self-paced (9 lessons plus a quiz)
Provider
DeepLearning.AI
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • Decide when fine-tuning beats prompt engineering or retrieval for a task
  • Tell a base model from an instruction-tuned one by their outputs
  • Prepare and format your own dataset for instruction fine-tuning runs
  • Run a fine-tuning training loop and read what the loss is telling you
  • Evaluate a fine-tuned model instead of judging it by a few prompts
  • Understand where fine-tuning sits in the wider LLM training pipeline
  • Scope a realistic first fine-tuning project you can actually finish

Highlights

  • Opens by comparing base Llama-2-7b, Llama-2-7b-chat and ChatGPT side by side, so the point of fine-tuning lands immediately
  • Covers evaluation and iteration, which most fine-tuning tutorials skip entirely
  • Ninety-five minutes in total, short enough to finish before committing GPU budget to a real run
  • Taught by Sharon Zhou, then CEO of Lamini, with Andrew Ng, and framed decision-first rather than API-first
  • Free with hosted notebooks, so nothing needs installing to follow along

Who It’s For

Best For

  • Engineers deciding whether their problem actually needs fine-tuning
  • Developers who have hit the ceiling of prompt engineering and RAG
  • Technical leads scoping a first custom-model project and its cost
  • Python developers new to model training but comfortable with PyTorch concepts

Prerequisites

  • Python familiarity, since the labs are Jupyter notebooks
  • Understanding of a deep learning framework such as PyTorch
  • Helpful: prior experience prompting an LLM API, since the course contrasts the two

FAQ

What is Finetuning Large Language Models?

A short DeepLearning.AI course with Sharon Zhou and Andrew Ng that treats fine-tuning as a decision before it treats it as a technique. Across nine lessons it contrasts base and instruction-tuned Llama-2 models, places fine-tuning against prompt engineering and retrieval, then walks through data preparation, the training process, and evaluation and iteration. Finish it and you can scope a first fine-tuning project honestly rather than guessing.

Is Finetuning Large Language Models free?

Finetuning Large Language Models is free to access.

What level is Finetuning Large Language Models for?

Finetuning Large Language Models is aimed at a intermediate audience. Recommended background: Python familiarity, since the labs are Jupyter notebooks, Understanding of a deep learning framework such as PyTorch, Helpful: prior experience prompting an LLM API, since the course contrasts the two.

How long does Finetuning Large Language Models take?

Expect roughly ~1 hour 35 minutes, self-paced (9 lessons plus a quiz). Most learners work through it at their own pace.

What will I learn from Finetuning Large Language Models?

You'll learn: Decide when fine-tuning beats prompt engineering or retrieval for a task; Tell a base model from an instruction-tuned one by their outputs; Prepare and format your own dataset for instruction fine-tuning runs; Run a fine-tuning training loop and read what the loss is telling you; Evaluate a fine-tuned model instead of judging it by a few prompts; Understand where fine-tuning sits in the wider LLM training pipeline; Scope a realistic first fine-tuning project you can actually finish.

Topics

fine-tuningllama 2laminiinstruction tuningdeeplearning.ai

Sources

This page was written from 3 sources, 2 on domains other than deeplearning.ai.

  1. 1.deeplearning.aifinetuning large language modelsvendor
  2. 2.github.comFinetuning Large Language Models
  3. 3.raw.githubusercontent.com01 Why finetuning lab student.ipynb