{
  "id": "peft-prefix-tuning-table",
  "kind": "table",
  "slug": "peft-prefix-tuning",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/peft-prefix-tuning/",
  "title": "Add learned prefixes in every layer with PrefixTuningConfig",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "PrefixTuningConfig",
      "source": "Hugging Face PEFT docs",
      "detail": "Task type and number of virtual tokens"
    },
    {
      "name": "num_virtual_tokens",
      "source": "Hugging Face PEFT docs",
      "detail": "Virtual tokens to add and learn"
    },
    {
      "name": "get_peft_model",
      "source": "Hugging Face PEFT docs",
      "detail": "Create a trainable PeftModel"
    },
    {
      "name": "prompt tuning",
      "source": "Hugging Face PEFT docs",
      "detail": "Prompt parameters at the input embeddings"
    },
    {
      "name": "encoder-decoder",
      "source": "Hugging Face PEFT docs",
      "detail": "Prefix is only applied to the decoder"
    }
  ],
  "related_slugs": [
    "2106-09685-lora",
    "peft-ia3",
    "hf-trainer"
  ],
  "license": "CC-BY-4.0",
  "source_license": "Apache-2.0 (Hugging Face PEFT docs); Apache-2.0 (huggingface/peft (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-19",
  "status": "deep-draft-20261119",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}