Fine-Tuning, and When Not ToLesson 24 of 84

Module 3 · Full, LoRA and the parameter-efficient family

Soft prompts and prefixes

In this lesson

  • 8 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 6 of 9 in this chapter

This chapter’s goalPredict on paper the memory a given model, method and sequence length will need, choose between full fine-tuning, LoRA, QLoRA and the tiny methods for a stated budget, and justify a rank, an alpha and a target-module set.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

Training the prompt instead of the model

A prompt is a sequence of token embeddings. Those embeddings are looked up from a table, but nothing in the architecture requires them to correspond to real tokens. You can prepend a handful of learned vectors (not the embedding of any word, just free parameters) and train them with gradient descent while every weight in the model stays frozen.

That is prompt tuning. With 20 virtual tokens on a model with hidden size 4,096, you are training 20 × 4,096 = 81,920 parameters. The artefact is about 320 kilobytes. You could store one per customer in a database column.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Running Models Yourself exam.

Stuck on something?Ask Rafael, your AI tutor

How to cite: Addaly (2026) ‘Soft prompts and prefixes’, in Fine-Tuning, and When Not To. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/fine-tuning/soft-prompts-and-prefixes (Accessed: 29 November 2026).