AI Cloud Architect

Reduce LLM latency with prefix-aware routing on Amazon SageMaker Inference

AWSBlog post by Kareem Syed-Mohammed, Dmitry Soldatkin, Vamsi Goparaju, Vivek Gangasani, Xu Deng and Xiaoguang ChenAWS Artificial Intelligence Blog

Amazon SageMaker Inference now offers prefix-aware routing, a routing strategy that sends requests sharing the same prompt prefix to the same instance so the KV cache stays warm. In benchmarks on Llama 3.1 70B, it reduced P50 time-to-first-token by up to 77% and raised KV cache hit rates from about 25% to over 80%.

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

AI: Summary

What it is

SageMaker Inference now routes requests that share a prompt prefix to the same instance, so the KV cache is reused; AWS reports lower time-to-first-token in its benchmarks.

Who it is for

Teams serving LLMs on SageMaker real-time endpoints with long shared prompts, such as RAG, multi-turn chat or templated bots.

Key points

  • Benchmarks on Llama 3.1 70B with vLLM: P50 TTFT down 71-77% for 8,000-token prefixes; AWS's claim, not independently verified.
  • Two parameters: PrefixLength (1024-65536) and ConcurrencyThreshold (1-1024); needs at least two instances.
  • Configured per production variant via RoutingConfig; no model or serving framework changes needed.

The same at other vendors

Same approach

GoogleAnnouncement

GKE Inference Gateway and Quickstart are GA

AI:Both offer managed inference routing with prefix-aware load balancing to reuse cache and cut latency, one on SageMaker and one on GKE

Timeline

  1. This postReduce LLM latency with prefix-aware routing on Amazon SageMaker Inference
  2. Listed inAmazon SageMaker Inference: 2026 year-to-date launches in review · AWS · Blog post

Go deeper