Herschel: Continuous Optimization of Production LLM Inference through On-Demand Profiling
Luping Wang, Weigao Chen, Yifei Wu, Yonghe Zhang, Rui Zhang, Wenchao Wu, Jiyu Luo, Haoran Geng, Xin Yang, Chen Cao, Yuemin Wu, Cheng Huang, Guodong Yang, Liping Zhang
Abstract
Model-as-a-service platforms call for continuous optimization as complex serving conditions expose inefficiencies missed before deployment. Detailed always-on profiling can incur substantial overhead, while lightweight collection omits information needed for diagnosis. We present Herschel, a continuous optimization system for production large language model (LLM) inference. Our key insight is that adaptive, on-demand profiling can provide rich full-stack evidence without continuous collection. Herschel safely attaches to and detaches from selected running processes without engine changes or restarts, and adapts coverage as investigations reveal missing evidence. Herschel reconstructs operator executions and cross-process dependencies to identify inefficiency mechanisms and suggest solutions using applicable reference fixes. AI agents implement and test engine and kernel changes under controlled conditions that preserve the triggering workload and dependencies, with expert review before deployment. Controlled tests show active-collection overhead below 0.5% for time to first token and 7% for time per output token. Bounded windows, typically 30 s, avoid the continuous cost of always-on tracing. Over six months, Herschel collected approximately 17,000 traces across over 120 model variants and more than 10 accelerator types, identifying inefficiency patterns in 23% of the traces. Representative findings guide widely deployed optimizations, including restructured synchronization, removal of unused computation, and improved operator implementations.
Create a lesson
Metadata
- Comments
- 17 pages
Related papers
UMLoad: Fast On-Demand Model Loading on Unified Memory Architecture
Shared title terminologycs.OSZimeng Wang, Jinrong Yang, Rong Chen
Valve: Production Online-Offline Inference Colocation with Jointly-Bounded Preemption Latency and Rate
Shared title terminologycs.OSFangyue Liu, Hua Liu, Xinyuan Lyu et al.
Polymorph: Operating System Kernel Optimization Through Artificial Intelligence
Shared title terminologycs.OSDean Sysman, Georgios Liargkovas, Tal Zussman et al.
HyCoInfer: Cloud-Edge Collaborative Inference for Large Language Models on Heterogeneous GPU-FPGA Architectures
Shared title terminologycs.OSZewen Huang, Xiangwen Zhuge, Yingkun Hu et al.
Tideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer Devices
Shared title terminologycs.OSYifei Wang, Tsun-yu Yang, Yechen Xu et al.
EngineAgent: Agentizing On-Device LLM Inference Engines with Inference Stack Hierarchy Awareness and Hardware Abilities
Shared title terminologycs.OSZhengxiang Huang, Yujie Sun, Shengheng Chen et al.