Response Length Perception and Sequence Scheduling: An LLM-Empowered LLM Inference Pipeline
Zangwei Zheng, Xiaozhe Ren, Fuzhao Xue, Yang Luo, Xin Jiang, Yang You
Abstract
Large language models (LLMs) have revolutionized the field of AI, demonstrating unprecedented capacity across various tasks. However, the inference process for LLMs comes with significant computational costs. In this paper, we propose an efficient LLM inference pipeline that harnesses the power of LLMs. Our approach begins by tapping into the potential of LLMs to accurately perceive and predict the response length with minimal overhead. By leveraging this information, we introduce an efficient sequence scheduling technique that gathers queries with similar response lengths into micro-batches. We evaluate our approach on real-world instruction datasets using the LLaMA-based model, and our results demonstrate an impressive 86% improvement in inference throughput compared to the vanilla batch inference without compromising effectiveness. Notably, our method is orthogonal to other inference acceleration techniques, making it a valuable addition to many existing toolkits (e.g. FlashAttention, Quantization) for LLM inference.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
27 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
- Efficient LLM Scheduling by Learning to Rank cites Orca: A Distributed Serving System for Transformer-Based Generative Models
- Efficient LLM Scheduling by Learning to Rank cites DynamoLLM: Designing LLM Inference Clusters for Performance and Energy Efficiency
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Language Models are Few-Shot Learners
- "AI Afterlife" as Digital Legacy: Perceptions, Expectations, and Concerns cites LoRA: Low-Rank Adaptation of Large Language Models
- Efficient Multi-task LLM Quantization and Serving for Multiple LoRA Adapters cites LoRA: Low-Rank Adaptation of Large Language Models
- Efficient Multi-task LLM Quantization and Serving for Multiple LoRA Adapters cites Orca: A Distributed Serving System for Transformer-Based Generative Models
- Orca: A Distributed Serving System for Transformer-Based Generative Models cites Language Models are Few-Shot Learners
- JITServe: SLO-aware LLM Serving with Imprecise Request Information cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- JITServe: SLO-aware LLM Serving with Imprecise Request Information cites Orca: A Distributed Serving System for Transformer-Based Generative Models
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
- DynamoLLM: Designing LLM Inference Clusters for Performance and Energy Efficiency cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- DynamoLLM: Designing LLM Inference Clusters for Performance and Energy Efficiency cites Orca: A Distributed Serving System for Transformer-Based Generative Models
Cited by top-tier papers27
- Efficient LLM Scheduling by Learning to RankYichao Fu, Siqi Zhu, Runlong Su, Aurick Qiao et al.NeurIPS 2024 · 129 citations
- DynamoLLM: Designing LLM Inference Clusters for Performance and Energy EfficiencyJovan Stojkovic, Chaojie Zhang, Íñigo Goiri, Josep Torrellas et al.HPCA 2025 · 106 citations
- JITServe: SLO-aware LLM Serving with Imprecise Request InformationWei Zhang, Zhiyu Wu, Yi Mu, Rui Ning et al.NSDI 2026 · 29 citations
- Efficient Multi-task LLM Quantization and Serving for Multiple LoRA AdaptersYifei Xia, Fangcheng Fu, Wentao Zhang, Jiawei Jiang et al.NeurIPS 2024 · 25 citations
- "AI Afterlife" as Digital Legacy: Perceptions, Expectations, and ConcernsYing Lei, Shuai Ma, Yuling Sun, Xiaojuan MaCHI 2025 · 24 citations
Builds on10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
- Orca: A Distributed Serving System for Transformer-Based Generative ModelsGyeong-In Yu, Joo Seong Jeong, Geon-Woo Kim, Soojeong Kim et al.OSDI 2022 · 690 citations
Related papers
- PKAS: Predictive KVCache-Aware Scheduling for Faster LLM and Transformer InferencesJie Ye, Avinash Maurya, Krishna Teja Chitty-Venkata, Bogdan Nicolae et al.HPDC 2026
- BATON: Enhancing Batch-wise Inference Efficiency for Large Language Models via Dynamic Re-batchingPeizhuang Cong, Qizhi Chen, Haochen Zhao, Tong YangWWW 2025 · 4 citations
- SparQ Attention: Bandwidth-Efficient LLM InferenceLuka Ribar, Ivan Chelombiev, Luke Hudlass-Galley, Charlie Blake et al.ICML 2024 · 108 citations
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu et al.NeurIPS 2024 · 479 citations
- Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-ServeAmey Agrawal, Nitin Kedia, Ashish Panwar, Jayashree Mohan et al.OSDI 2024 · 537 citations
