← all repositories
SakanaAI/self-adaptive-llms

Transformer² edits singular weights per prompt, not the whole model

It lets large language models adapt to new tasks during inference by selectively mixing small, reinforcement-learned expert vectors into their weight matrices.

1.2k stars Python Language ModelsML Frameworks
self-adaptive-llms
Not currently ranked — collecting fresh signals.
star history

What it does

Transformer² is a research framework that retargets an LLM’s behavior for each incoming prompt without a full fine-tuning cycle. It runs two passes during inference: a dispatch system first identifies the task properties, then blends task-specific expert vectors into the model’s weight matrices. The edits are narrow—it only adjusts the singular components, leaving the rest of the network untouched.

The interesting bit

Instead of baking all task knowledge into one static model, the framework keeps a collection of small expert vectors trained with reinforcement learning and mixes them dynamically at inference time. That treats weight matrices as partially editable rather than fixed.

Key highlights

  • Adapts to unseen tasks in real time during inference
  • Modifies only singular components of weight matrices
  • Uses a two-pass dispatch-and-mix pipeline: task identification followed by expert blending
  • Trains task-specific experts via reinforcement learning
  • Ships with scripts for prompt-based and few-shot evaluation

Caveats

  • The README never lists which base models or tasks are actually supported
  • No performance numbers, comparisons, or hardware requirements appear in the docs
  • How the dispatch system handles ambiguous or multi-task prompts is unexplained

Verdict

Worth exploring if you’re researching modular LLM architectures or lightweight adaptation methods. If you need a mature, drop-in replacement for conventional fine-tuning, this is still an early research artifact.

Frequently asked

What is SakanaAI/self-adaptive-llms?
It lets large language models adapt to new tasks during inference by selectively mixing small, reinforcement-learned expert vectors into their weight matrices.
Is self-adaptive-llms open source?
Yes — SakanaAI/self-adaptive-llms is open source, released under the Apache-2.0 license.
What language is self-adaptive-llms written in?
SakanaAI/self-adaptive-llms is primarily written in Python.
How popular is self-adaptive-llms?
SakanaAI/self-adaptive-llms has 1.2k stars on GitHub.
Where can I find self-adaptive-llms?
SakanaAI/self-adaptive-llms is on GitHub at https://github.com/SakanaAI/self-adaptive-llms.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.