LoomFormer's loom attention reportedly matches Transformers trained with over 3x compute

LoomFormer's loom attention reportedly matches Transformers trained with over 3x compute

A paper listed on Hugging Face Papers proposes loom attention, a change to how Transformer attention heads draw on each other's work. In a standard Transformer, a head attends horizontally over tokens. Loom attention interweaves that horizontal attention with what the authors call vertical attention: each head attends over the outputs of earlier heads to obtain its own query, key and value. The authors say this allows a Transformer to dynamically rewire its circuits at every token.

To keep vertical attention efficient, the authors implement it with normalized and gated linear attention over a per-token matrix memory. That memory stores the compressed head outputs and serves as a second residual stream. The result is LoomFormer, a dual-stream architecture that splits control and content between the vector stream and the matrix stream.

The headline claim concerns compute efficiency. Across model sizes and training token budgets, in language modeling and downstream tasks, the authors report that LoomFormer matches Transformers trained with over 3x compute. It also matches recent residual-stream baselines (HC/mHC, MUDDFormer, AttnRes) trained with about 1.7-2.8x compute.

One concrete comparison is given. LoomPythia-2.8B and the baselines were trained on the same 300B tokens, and LoomPythia-2.8B used only 2% extra FLOPs. In that setup it achieves about 1.6x the average downstream gain of mHC-Pythia-2.8B over Pythia-2.8B. The authors also say it matches Pythia-12B in 0-shot evaluation and surpasses it in 5-shot evaluation. Code is available at github.com/Caiyun-AI/LoomFormer.

Key facts

  • Loom attention interweaves a head's vertical attention over earlier heads' outputs (used to get its query, key and value) with its usual horizontal attention over tokens.
  • Vertical attention uses normalized and gated linear attention over a per-token matrix memory, which acts as a second residual stream; the resulting dual-stream design is LoomFormer.
  • The authors report LoomFormer matches Transformers trained with over 3x compute, and residual-stream baselines (HC/mHC, MUDDFormer, AttnRes) trained with about 1.7-2.8x.
  • On the same 300B tokens and with only 2% extra FLOPs, LoomPythia-2.8B gets about 1.6x the average downstream gain of mHC-Pythia-2.8B over Pythia-2.8B.
  • LoomPythia-2.8B matches Pythia-12B in 0-shot and surpasses it in 5-shot; code is on GitHub under Caiyun-AI/LoomFormer.

Why it matters

The claim is about getting more from the same training compute. The authors say LoomFormer matches Transformers trained with over 3x compute, and recent residual-stream designs trained with about 1.7-2.8x. If that holds up, a small overhead (2% extra FLOPs in the LoomPythia-2.8B comparison) buys a large efficiency gain. The idea itself is also notable: it gives each head access to earlier heads' outputs through a second, matrix-valued residual stream, so the circuit a token uses can change from token to token.

Who it affects

Mainly researchers working on Transformer architecture and residual-stream variants, since the paper compares itself directly with HC/mHC, MUDDFormer and AttnRes. It is also relevant to anyone training language models who cares about compute cost, because the results are framed as compute-equivalence.

How to use it

Code is available at https://github.com/Caiyun-AI/LoomFormer. The abstract gives no setup instructions, licence or pricing, so a practitioner would need to look at the repository. The paper's own test bed is Pythia-style models (LoomPythia-2.8B against Pythia-2.8B and Pythia-12B).

How solid is it

This rests on the abstract as listed on Hugging Face Papers. The abstract names no authors or institutions, only the GitHub organization Caiyun-AI in the code link. The extra 2% FLOPs is given only for LoomPythia-2.8B. No absolute benchmark scores or task names are given, and the downstream gain is stated only as a ratio. The claims are the authors' own, and no independent replication or reaction is mentioned.

Risks and caveats

The compute-equivalence figures are the authors' reported results, not independently checked. The 1.6x figure is a ratio of gains over a baseline, not an accuracy number, and it is not stated which tasks make up the average downstream gain. The 2% FLOPs overhead is given for one model size only, so the cost at other sizes is unknown from this text. It is not stated whether the paper is peer reviewed.

“allows a Transformer to dynamically rewire its circuits at every token”

— From the paper's abstract, describing loom attention