2 / 2430

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

TL;DR

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%.

Nauti's Take

For teams running Llama and other open models on SageMaker, this is a concrete advantage: reusing long system prompts or agent context cuts latency and compute without touching the model. The limit is the workload itself, since highly varied prompts keep the cache cold, and the 77 percent figure comes from AWS's own benchmarks.

We would test with real traffic before replanning any capacity.

Sources