Search the guide

Start with a guide

Lesson 7 of 14 · Construct programs

Generate an adapter from text

Use a task description as the input to a weight generator.

Describe the task#

Text-to-LoRA conditions a trained hypernetwork on a natural-language task description. The output is a LoRA adapter for a compatible base model. The description selects the adaptation; the model then handles the task’s individual inputs.

Follow the data#

  • Description: what the model should do.
  • Generator: the trained mapping from description to adapter parameters.
  • Adapter and base model: the network that runs on new inputs.

Read the Text-to-LoRA paper and implementation. Identify the description passed to the generator and the base model that receives its adapter.

Generation and training happen at different times#

Training teaches the generator how task descriptions relate to adapters. Generating an adapter for a new description uses a forward pass through that trained generator.

Sources and resources

Course contents