Large Language Models (LLMs) have achieved strong performance across natural language and multimodal tasks, yet their practical deployment remains constrained by inference latency and kernel launch overhead, particularly in interactive, short-sequence settings. This paper presents a hybrid runtime framework that combines Just-In-Time (JIT) compilation with CUDA Graph execution to reduce launch overhead while preserving runtime flexibility during autoregressive decoding. The framework partitions transformer inference into static components executed via CUDA Graph replay and dynamic components handled through JIT-compiled kernels, enabling asynchronous graph capture and reuse across decoding steps. We evaluate the proposed approach on LLaMA-2 7B using single-GPU, batch-size-one inference across prompt lengths from 10 to 500 tokens. Experimental results show that the hybrid runtime reduces Time-to-First-Token (TTFT) by up to 66.0% and achieves lower P99 latency compared with TensorRT-LLM in this regime. These results indicate that hybrid JIT-CUDA Graph execution can effectively reduce inference latency and variance for short-sequence LLM workloads, making it a practical optimization strategy for latency-sensitive AI applications.


翻译:大型语言模型(LLM)在自然语言和多模态任务中取得了优异性能,但其实际部署仍受限于推理延迟和内核启动开销,特别是在交互式短序列场景中。本文提出一种混合运行时框架,结合即时(JIT)编译与CUDA图执行,在自回归解码过程中降低启动开销的同时保持运行时灵活性。该框架将Transformer推理划分为通过CUDA图回放执行的静态组件和由JIT编译内核处理的动态组件,从而实现异步图捕获并跨解码步骤重用。我们采用单GPU、批量大小为1的推理配置,在提示长度从10到500个token范围内,对LLaMA-2 7B模型评估所提方法。实验结果表明,在该场景下,混合运行时相比TensorRT-LLM能将首token延迟(TTFT)降低高达66.0%,并实现更低的P99延迟。这些结果证明,混合JIT-CUDA图执行能有效降低短序列LLM工作负载的推理延迟和方差,从而成为延迟敏感型AI应用的一种实用优化策略。

0
下载
关闭预览

相关内容

大型语言模型推理引擎的综述:优化与效率的视角
专知会员服务
23+阅读 · 2025年5月13日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
33+阅读 · 2025年4月1日
大规模语言模型推理的进展综述
专知会员服务
57+阅读 · 2025年2月8日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
美以伊冲突:无人机与人工智能的运用
专知会员服务
1+阅读 · 12分钟前
《特种部队在透明战场中的生存力》最新报告
专知会员服务
1+阅读 · 32分钟前
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
7+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员