AI Cloud Architect

Beyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch

AWSHow-to by Kevin Shabahang, Iman Abbasnejad, Massimo Bardetti, Daniel Wirjo and Xiaodong YuAWS 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.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

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.

Timeline

Posts about AWS Trainium, oldest first.

  1. How-toAccelerating decode-heavy LLM inference with speculative decoding on AWS Trainium and vLLM · AWS · How-to
  2. Update to an existing featureAWS Neuron SDK 2.29.0 now available with NKI and Neuron Explorer out of Beta, a new CPU Simulator, and an expanded NKI Library · AWS · Release note
  3. New featureAWS Neuron SDK now available with Neuron Agentic Development for NKI kernel development on Trainium · AWS · Announcement
  4. How-toStop hand-tuning kernels: How Neuron Agentic Development accelerates AWS Trainium optimizations · AWS · How-to
  5. How-toHow Deepgram optimized voice AI at scale with AWS Trainium · AWS · How-to
  6. PreviewAWS announces TorchNeuron: Native PyTorch Support for AWS Trainium (Public Beta) · AWS · Announcement
  7. This postBeyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch
  8. How-toTrain Qwen3 on AWS Trainium with torchtitan · AWS · How-to
  9. How-toDeploy frontier AI models on AWS Trainium with SGLang-Neuron · AWS · How-to
Show all 10 posts
  1. Customer storySplash Music transforms music generation using AWS Trainium and Amazon SageMaker HyperPod · AWS · Customer story
  2. How-toAccelerating decode-heavy LLM inference with speculative decoding on AWS Trainium and vLLM · AWS · How-to
  3. Update to an existing featureAWS Neuron SDK 2.29.0 now available with NKI and Neuron Explorer out of Beta, a new CPU Simulator, and an expanded NKI Library · AWS · Release note
  4. New featureAWS Neuron SDK now available with Neuron Agentic Development for NKI kernel development on Trainium · AWS · Announcement
  5. How-toStop hand-tuning kernels: How Neuron Agentic Development accelerates AWS Trainium optimizations · AWS · How-to
  6. How-toHow Deepgram optimized voice AI at scale with AWS Trainium · AWS · How-to
  7. PreviewAWS announces TorchNeuron: Native PyTorch Support for AWS Trainium (Public Beta) · AWS · Announcement
  8. This postBeyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch
  9. How-toTrain Qwen3 on AWS Trainium with torchtitan · AWS · How-to
  10. How-toDeploy frontier AI models on AWS Trainium with SGLang-Neuron · AWS · How-to

Go deeper