Training linear-attention Laplace 3B on AWS Trainium2: 120K tokens/sec, fixed 29.5MB state
AWS ML Blog · rss · 2026-10-21
AWS ML Blog details how i14 trained and served Laplace 3B, a 24-layer model replacing softmax attention with Gated Linear Attention (GLA), on AWS Trainium2 using native PyTorch via TorchNeuron Native.
Architecture
- GLA compresses history into a fixed 29.5 MB recurrent state per sequence, independent of context length; training attention drops from O(T²) to O(T)
- 16 heads with geometrically scheduled decay rates (half-lives from 1 to 2,048 tokens), trained with the Muon optimizer
Three Trainium2 adaptations
- Rewrote the GPU-specific Triton GLA kernel with standard PyTorch operators, using 16 chunks of 128 tokens to match the NeuronCore's 128 on-chip buffer partitions
- Redesigned Muon communication: two alltoall collectives in MuonFSDP2 cut per-rank traffic 24x and raised throughput 1.63x
- Statically unrolled the 16-step GLA recurrence to fit the static compiler's graph and on-chip memory limits
Results: a single trn2.48xlarge instance (16 Trainium2 chips) trains at 120K tokens/sec and serves 11,544 output tokens/sec across 1,280 concurrent sequences.
More from Infra
- Amazon's 1.1T MoE Ergo quantized to 4-bit at 645GB using just 1TB scratch disk — textclf · 2026-12-05
- At 40c/KWh, running a local LLM costs more than just using cloud models — ECrispy · 2026-12-05
- Critics slam China AI chip access report: 211k–1.086M chip estimate range — teortaxesTex · 2026-12-05
- SemiAnalysis: B300/GB300 GPU rental contract prices eased 10% MoM in November, first drop — AccBalanced · 2026-12-05
- nvdriver-windows: a 100% Rust, clean-room open-source NVIDIA Windows driver for CUDA and gaming — QuixiAI · 2026-12-05
- Qwen4-35B-A3B hits 347 tok/s on RTX 5090, even a 10-year-old Tesla P40 manages 70 tps — QuixiAI · 2026-12-05