← Builder galleryReference pattern

Multi-head decision layer

Many classifiers, one frozen backbone: task-specific heads share a single LFM2.5-350M forward pass.

14
decision heads on one backbone
22.9 MB
total adapter + head weight
1
forward pass per request

The recipe

Freeze the 350M backbone. For each decision task, train a small classification head (and optionally a shared LoRA) on top of mean-pooled hidden states. At inference, one forward pass feeds every head — adding a task costs kilobytes, not a model.

Mean-pooling is a contract, not a preference: train-time and runtime pooling must match exactly, or accuracy silently collapses (last-token pooling was the root cause of a full retrain in this codebase).

input → LFM2.5-350M (frozen) → mean-pool
  ├─ head: intent (24 classes)
  ├─ head: risk (4 classes)
  ├─ head: compliance (binary)
  └─ … one small linear head per decision

When to use it

You have many bounded classification decisions in one hot path — routing, gating, scoring — and per-decision fine-tunes would each cost a sidecar. The heads share latency, memory, and one deployment.

Live examples of this pattern

Start from code