Beyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch
AWS•How-to••by Kevin Shabahang, Iman Abbasnejad, Massimo Bardetti, Daniel Wirjo and Xiaodong Yu•AWS Artificial Intelligence Blog
Learn how i14 trained and served Laplace 3B, a linear attention model, on AWS Trainium2 using native PyTorch. Its recurrent state stays fixed at 29.5 MB per sequence regardless of context length, avoiding the growing key-value cache of transformer models and keeping serving memory predictable.
i14's Laplace 3B linear attention model was trained and served on Trainium2 using native PyTorch, with recurrent state fixed at 29.5 MB per sequence regardless of context length.
Who it is for
Teams running custom or long-context models on AWS Trainium2 that want to compare fixed-state linear attention with KV-cache serving.
Key points
Reported training throughput is about 120,000 tokens per second on one trn2.48xlarge, per i14 and the GenAIIC team.
Reported serving throughput is 11,544 output tokens per second across 1,280 concurrent sequences on one trn2.48xlarge.
Parallelizing Muon's Newton-Schulz step with all_to_all raised training throughput 1.63 times, according to the post.
Training results cover interim steps (about 44 billion of 100 billion tokens) at a 2,048-token sequence length; long-context retrieval quality is not measured.
AI:A weekly digest where the AI items are: Polly Generative engine adds 14 voices (two Brazilian Portuguese); TorchNeuron public beta runs PyTorch on Trainium; SageMaker AI training sessions reach GA; Claude structured outputs on Bedrock; AWS Agent Registry for runtime tool discovery.
AI:vLLM gains a push-based NIXL connector that moves KV cache transfer setup off the critical path in prefill-decode disaggregated inference, per AWS benchmarks.
AI:Neuron 2.32 adds NKI 0.6.0 with an on-device top-K instruction, variable-size all-gather, reduce-scatter and all-to-all collectives on Trn2 and Trn3, and 13 new NKI kernels for MoE training and sparse attention.