﻿# Multitask prompt tuning: a shared prompt with task-specific modulation

Understand shared soft-prompt transfer, multiplicative low-rank task modulation, task identifiers and the evaluation boundary between source and target tasks.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-multitask-prompt-transfer/
Language: en

Multitask prompt tuning tries to transfer useful structure between learned soft prompts. Rather than training every task prompt independently from scratch, it learns a shared prompt and task-specific multiplicative low-rank modifications. Source-task training and target-task adaptation are separate phases with different evaluation questions.

## Locate the shared and private components

The task prompt combines a shared matrix with a task-specific modulation through an elementwise product. That is different from adding a LoRA update to a model's weight matrix. The low-rank factors describe how prompt entries change for the task. Retain the shared prompt and the relevant task factors together; either component alone can be insufficient to reconstruct the intended model input.

## Preserve the task identifier mapping

A multitask implementation must select the correct task-specific state for each example. Record the mapping between human task names and internal identifiers. Reordering a dataset's label catalogue or changing task numbering can apply the wrong modulation without creating an obvious tensor-shape error. Inspect a small mixed-task batch and confirm the effective prompts associated with its examples before interpreting aggregate training loss.

## Separate source learning from target transfer

The original method distills knowledge from source prompts into a transferable shared representation, then adapts that representation to target tasks. A target evaluation already represented in source training answers a different question from transfer to an unseen task. Document overlaps and holdout policy. Include the preparation of the shared prompt when reporting total cost, while distinguishing reusable investment from per-target adaptation expense.

## Evaluate task-level results

For an illustrative collection of document classifiers, retain separate metrics and failure cases for each target task. A strong average can hide a regression on a rare language or label set. Compare against independently tuned prompts and a declared baseline under the same data budget. The paper's multitask results are evidence for its benchmark setting, not proof that sharing helps every collection of unrelated application tasks.

## Reload the complete serving state

Preserve the frozen base revision, tokenizer, shared prompt, task factors and input formatting. Confirm how the serving implementation chooses task state and separates caches. A generic text endpoint does not establish support for the numeric prompt representation. Validate fixed inputs after a reload before deploying a new target adaptation. The method is useful when the shared component delivers reproducible transfer while keeping each task's behavior inspectable.

## Primary references

[PEFT: multitask prompt tuning](https://huggingface.co/docs/peft/package_reference/multitask_prompt_tuning).

[Multitask prompt tuning original research](https://arxiv.org/abs/2303.02861).

[Multitask prompt tuning authors project](https://zhenwang9102.github.io/mpt.html).

Related explanations: [elementwise and matrix operations](/journal/neural-matmul-elementwise-products/); [evaluation split boundaries](/journal/document-level-data-split-leakage/).
