ProfInfer: 基于eBPF的细粒度LLM推理分析器
ProfInfer: An eBPF-based Fine-Grained LLM Inference Profiler
AI总结:
ProfInfer基于eBPF技术,为LLM推理引擎提供细粒度性能分析,通过动态探针实现非侵入式监控,帮助优化调度和资源管理。
摘要:
随着大型语言模型(LLM)从研究转向生产,理解推理引擎在实时中的行为变得至关重要且困难。与通用引擎如ONNX Runtime不同,当今的LLM推理系统在操作层面缺乏可见性,使开发者无法了解时间和资源的使用情况。即使基本问题——这个工作负载是内存受限还是计算受限?——也常常无法回答。为弥补这一差距,我们开发了一个细粒度、非侵入性的分析框架,用于现代LLM推理引擎,例如llama-cpp,但也可应用于类似运行时架构。基于扩展的伯克利数据包过滤(eBPF)技术,我们的系统在多个层次动态附加探针到运行时函数上——无需修改或重新编译源代码。它将收集到的跟踪转换为丰富的可视化效果,包括操作符、图、时间线和硬件计数器趋势,揭示密集推理、混合专家路由和操作符卸载在实际中的行为。在小于4%的运行时开销和高分析精度下,我们的框架使LLM推理既透明又可诊断,将性能分析转化为优化、调度和资源感知部署的实用工具。
英文摘要:
As large language models (LLMs) move from research to production, understanding how inference engines behave in real time has become both essential and elusive. Unlike general-purpose engines such as ONNX Runtime, today's LLM inference systems offer little operator-level visibility, leaving developers blind to where time and resources go. Even basic questions -- is this workload memory-bound or compute-bound? -- often remain unanswered. To close this gap, we develop a fine-grained, non-intrusive profiling framework for modern LLM inference engines, exemplified by llama-cpp but applicable to similar runtime architectures. Built on extended Berkeley Packet Filter (eBPF) technology, our system dynamically attaches probes to runtime functions across multiple layers -- without modifying or recompiling the source. It transforms collected traces into rich visualizations of operators, graphs, timelines, and hardware counter trends, exposing how dense inference, Mixture-of-Experts routing, and operator offloading behave in practice. With less than 4% runtime overhead and high profiling fidelity, our framework makes LLM inference both transparent and diagnosable, turning performance profiling into a practical tool for optimization, scheduling, and resource-aware deployment.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。