Generative AI · Advanced level

Advanced level · Module 4 of 12 · 13 guided hours

Parameter-Efficient Fine-Tuning

Adapting large models by training only small parts: why PEFT works, the main methods, the Hugging Face PEFT library, QLoRA for memory savings, and evaluating PEFT models.

Learning objectives

  • Explain parameter-efficient fine-tuning and its methods
  • Apply PEFT with the Hugging Face library
  • Evaluate and manage PEFT adapters

Topics

  • why full fine-tuning is costly
  • PEFT methods: LoRA, prompt tuning, adapters
  • the PEFT library
  • QLoRA and memory
  • trainable parameter counts
  • adapter management

Lessons

  1. Lesson 1 Why Parameter-Efficient Fine-Tuning

    Learners compare full fine-tuning with PEFT in memory, storage and data needs, and survey the main PEFT methods.

    full fine-tuningfrozen base modelLoRAprompt tuningadapters

  2. Lesson 2 Applying PEFT with Hugging Face

    Learners wrap a model with a PEFT configuration, check how many parameters are trainable, and train it with the same trainer as before.

    LoraConfigget_peft_modelprint_trainable_parametersadapter savingtraining with TRL

  3. Lesson 3 QLoRA, Memory and Evaluating Adapters

    Learners study QLoRA (fine-tuning on a quantised base model), estimate memory needs, and evaluate adapters against the base and fully fine-tuned models.

    QLoRA4-bit base modelGPU requirementsadapter evaluationadapter versioning

Practical activity

Train, evaluate and version a LoRA adapter for the capstone's narrow task, with a memory estimate and a QLoRA comparison.

Expected outcomes

  • Practical PEFT skills
  • Disciplined adapter evaluation

Assessment

Adapter training and evaluation (70%) and memory estimate (30%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.