Vibeleaderboard
← All Intel
Intel / article

AWS 'priming' builds efficient hybrid LLMs from Transformers

Source
amazon.science
Author
Amazon Science
Date
From the Daily Brief

Amazon researchers describe a technique they call priming, which converts an already pretrained Transformer into a hybrid model that mixes attention with state-space layers. The conversion uses less than 0.5% of the tokens spent on the original pretraining. Their 32B result stays within about 1% of the source model's quality while roughly halving the key-value cache and decoding up to 2.3 times faster. The KV cache is what grows with context length and limits how many long requests a GPU can hold at once, so halving it directly raises long-context serving capacity. Hybrid architectures have shown these efficiency gains before, but they normally require pretraining from scratch, which few teams can afford. Priming starts from an existing checkpoint instead. AWS released the code, 8B and 32B models, and a vLLM plugin, so the result can be reproduced on a standard serving stack, and the authors point to long-context agent serving and RL rollouts as the main uses.

Read the 2026-10-23 Brief →

Context

Priming is a way to build a hybrid language model by converting an existing Transformer instead of a new one. A hybrid keeps some attention layers, which store every past token in a memory (the ) that grows with the length of the context, and replaces others with state space layers, which carry a fixed-size compressed summary of everything seen so far. That smaller memory is what makes hybrids faster on long inputs. Until now, the Amazon researchers say, trying a new hybrid design meant pretraining it from scratch on trillions of tokens, which kept most large-scale comparisons out of reach. In their paper, priming starts from a pretrained Transformer and needs less than 0.5% of the source model's pretraining .

The method rests on a structural similarity: both attention and state space layers can be written as a matrix that decides how much each earlier token contributes to the current one. Where a state space layer can approximate an attention layer's matrix closely, the attention layer's learned query, key and value projections can be reused as the new layer's inputs, and only the parts specific to the state space layer have to be learned. Priming first picks which layers to convert, using a cheap test: layers that lose little when restricted to a short window of recent tokens are doing local work and are good candidates. It then copies the weights over, briefly trains each new layer to imitate the attention layer it replaced, and finally fine-tunes the whole model.

Because every variant starts from the same model, the team could compare three kinds of state space layer under identical conditions, with half of the sequence-mixing layers converted. Gated KalmaNet came out ahead of Gated DeltaNet, which beat Mamba-2, matching the order of how expressive their state updates are in theory. Every state space hybrid also beat a hybrid that used sliding-window attention instead, even when the window had two to four times as much memory. Gated KalmaNet can also run fewer solver iterations at serving time; the Amazon Science post says cutting from 30 to 10 iterations costs about 1% accuracy on AIME 2025 for 10% faster decoding.

The headline quality claim is narrower than "matches its source" may suggest. All reported results are on Qwen's Qwen3 at 8B and 32B; the authors say the method works across Transformer families such as Llama and Mistral and on models, but the paper reports no results for them. The 32B reasoning hybrid averages 63.0 across the paper's reasoning benchmarks, 3.8 points above off-the-shelf Qwen3-32B (59.2) but 1.1 points below the 64.1 of Qwen3-32B fine-tuned with the same recipe. The blog calls that within 1%; the paper's results section puts it at about 1.7% relative. In exchange, it needs roughly half the KV cache, which lets more requests run at once on the same GPU: with Gated KalmaNet running 10 solver iterations, decode throughput is 1.5 times the Transformer's at 16,000 tokens of context and about 2.1 times at 128,000, and on AIME 2025 it reached target accuracy 1.2 to 1.4 times as fast in wall-clock time. The models, training code, kernels and a vLLM serving plugin are released under Apache 2.0 on GitHub and Hugging Face.

Key takeaways · AI-distilled
  • AWS's priming converts a pretrained Transformer into a hybrid state space model by reusing its query, key and value projections as the SSM's input projections, using under 0.5% of the source model's pretraining token budget.
  • Priming picks layers with a cheap proxy: swap each attention layer for sliding-window attention and measure the loss. Layers that tolerate it do local work a fixed-size state can hold, while long-range retrieval layers stay as attention.
  • In AWS's controlled comparison, Gated KalmaNet beat Gated DeltaNet, which beat Mamba-2, with the widest gap on long-context reasoning. Every SSM hybrid also beat sliding-window hybrids given two to four times the memory.
  • Gated KalmaNet's iteration count is adjustable at serving time: 10 iterations instead of 30 cost about 1% accuracy on AIME 2025 for 10% faster decoding, so one trained model can serve several latency tiers.
  • AWS reports its 32B hybrid reaches target AIME 2025 accuracy 1.2 to 1.4 times as fast as Qwen3-32B at realistic concurrency, since the fixed-size state roughly halves per-sequence memory. The throughput gain grows from 1.5x at 16K to 2.06x at 128K.
Terms in this piece · Glossary
  • pretraining — The first, biggest phase of building a model: training it on enormous amounts of text so it learns language, facts, and reasoning in general.
  • KV cache — The memory a model keeps about text it has already read, so generating each new token doesn't require reprocessing the whole conversation.
  • token budget — A cap on how many tokens a task, session, or agent run may consume — the practical control on both cost and how long an agent will grind.
  • mixture-of-experts — A model built from many specialist sub-networks where only a few activate per token, giving big-model capability at small-model running cost.
Read the source amazon.science
More from Amazon Science
Recommended reads
Comments

Checking sign-in…

Loading comments…