Explore the research collection
2 entries · Follow this search
- Paper
Identity on Demand: Multi-Head Gated Value Residuals
Later attention layers must recover a token's identity from a residual stream that has accumulated every earlier layer's changes, which matters whenever a layer needs to copy a token or use it for a lookup. Multi-Head Gated Value Residuals (MGVR), from the independent lab Empero, keep a route open to the first layer's values: each later layer reads its normalized input and produces (a) a gate per key–value head, in [0, 2], scaling its own value, and (b) a token-dependent mixing row over the first layer's value heads; the value entering the unchanged attention kernel is the gated own value plus the mixed first-layer anchor. Where ResFormer (Zhou et al.) adds first-layer values with a share fixed across tokens and heads or learned per layer, MGVR makes the share a per-token, per-head decision with cross-head mixing; at initialization it is exactly ResFormer with λ = 0.5. The change adds 0.2% active parameters and 0.2% of model FLOPs in arithmetic (though the training step runs 4.3% slower), and the modified values occupy the existing KV-cache slots, so the KV cache does not grow. In a controlled paired pretraining run (20 layers, 96M active parameters, ~1.0B tokens, shared initialization, data order, and hyperparameters), MGVR's held-out loss at step 300 is 3.5572 vs the Transformer's 3.7605 nats/token; the stable-phase matched-loss calculation gives the same loss in 16–20% fewer steps, i.e. about 1.20× effective compute after the step-time penalty, and the final gap is −0.0500 nats/token (2.8124 vs 2.8624). On a synthetic two-hop recall probe (learning-speed AUC, three seeds), MGVR scores 0.273/0.167 on the 10/20-chain versions vs 0.257/0.144 for ResFormer with a learned layer-level λ; a mix-only ablation matches full MGVR (0.272/0.167), indicating the token-dependent mixing module — not gating alone — carries the composition gain. Limits: the efficiency figures are matched-loss calculations, not measured end-to-end savings; evidence is one paired run at 96M scale; and identity preservation is the authors' interpretation of learning-outcome measurements.
- Code
Homebrew: an open agent that brews AI models with you
Guided console agent ('brewmaster') that turns model fine-tuning into a beginner-friendly conversation: the user describes the goal and the agent handles base-model selection, data preparation, safe hyperparameters, and training. The guiding AI can be Claude, any OpenAI-compatible model, or a local model. Supports text models (Qwen3, Qwen3.5, Llama 3.x, Gemma 3/4) with LoRA/QLoRA/full fine-tuning via chainable CPT -> SFT -> DPO regimes, plus image LoRAs for Qwen-Image 2.1 with live previews. Trains on a local GPU or an automatically provisioned rented GPU (Runpod/Vast.ai), with publishing to Hugging Face. Demo proof: 'Grandma's Kitchen' (Qwen3.5 2B writing recipes in a warm grandma voice) and a Y2K digicam LoRA for Qwen-Image 2.1, each brewed in a single guided session on one rented GPU.