Reproduce “BatchLLM: Optimizing Large Batched LLM Inference with Global Prefix Sharing and Throughput-oriented Token Batching” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Zhen Zheng, Xin Ji, Taosong Fang, Fanghao Zhou, Chuanjie Liu, Gang Peng

BatchLLM is an inference system designed to optimize large-batch LLM processing by employing explicit global prefix sharing and throughput-oriented token batching. The system demonstrated 1.4x to 4.1x speedup compared to vLLM and 1.2x to 2.8x speedup compared to SGLang on A100 and MI200 GPUs across various models and workloads.

Key insights

  • For large, pre-known batch workloads, leveraging static information about common prefixes and length distributions enables proactive, global optimizations that surpass dynamic, reactive caching strategies.
  • Explicitly managing global prefix reuse across an entire batch significantly improves KV cache efficiency and token saving ratios compared to implicit, LRU-based methods.
  • Throughput-oriented token batching and scheduling, which prioritize memory utilization and intelligent mixing of prefill and decoding tokens, are critical for maintaining high and consistent GPU saturation in large-batch LLM inference.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.