Best practice for processing batch vLLM api calls with shared prefix?
Summary
The author describes their agent workflow using asyncio.gather to batch vLLM API calls with shared prefixes and asks for best practices to optimize this process, proposing a pre-caching strategy for efficient decoding.
Similar Articles
@akshay_pachaar: How vLLM stops one long prompt from stalling others: (chunked prefill, clearly explained) Every LLM request has two pha…
A technical explainer on how vLLM's chunked prefill prevents long prompts from stalling concurrent decoding requests, covering latency tradeoffs, mixed batching, and the `--max-num-batched-tokens` knob in vLLM V1.
@_avichawla: Prefix-aware LLM routing, clearly explained! (trick to get first LLM token 170x sooner) Production prompts start with t…
文章清晰解释了前缀感知的 LLM 路由机制:通过按块哈希提示词并维护块到 worker 的索引,让请求路由到持有共享前缀 KV 缓存的 GPU,实测在 8 个 vLLM Pod(16 张 H100)上将 p90 首 token 延迟从 92.5 秒降至 0.54 秒。
@freeCodeCamp: AI agents can turn a single user request into many LLM calls, making inference a performance bottleneck. In this tutori…
A tutorial on using vLLM to efficiently serve LLM inference for AI agents, covering concepts like continuous batching and PagedAttention to address performance bottlenecks.
Sparse Prefix Caching for Hybrid and Recurrent LLM Serving
This paper introduces sparse prefix caching for hybrid and recurrent LLMs, which stores recurrent states at a limited set of checkpoint positions to avoid dense caching while minimizing recomputation. The method outperforms standard heuristics on real-world data, especially when requests share substantial but non-identical prefixes.
Which API for general real-time LLM agents [D]
A Hacker News discussion exploring what API/interface should be used to build general real-time asynchronous LLM agents that can react to new stimuli (interruptions, live event streams) mid-inference, referencing the AsyncLLM preprint and existing vendor real-time APIs as partial solutions.