本文提出基于 Roofline 模型的统一框架,通过操作强度(OI)统一架构原语和硬件约束,引入相对推理潜力作为新指标,分析不同 LLMs 在相同硬件上的效率差异,并揭示序列长度和模型深度对性能和 OI 的影响。
摘要:
通过小型语言模型(SLMs)实现本地智能的转变,加剧了在资源受限边缘硬件上进行严格性能表征的需求。然而,客观测量不同架构在异构平台上的理论性能上限仍是一个严峻挑战。本文提出基于 Roofline 模型的系统框架,通过操作强度(OI)统一架构原语和硬件约束。通过定义推理潜力区域,引入相对推理潜力作为新指标,比较大型语言模型(LLMs)在相同硬件上的效率差异。广泛的经验分析揭示性能和 OI 受序列长度显著影响。此外,发现随着模型深度增加,OI 出现关键回归。研究还指出由硬件异构性引起的效率陷阱,并展示结构改进如多头潜在注意力(M LA)如何在不同硬件上释放潜在推理潜力。这些见解为硬件软件协同设计提供了可行方向,以使神经结构与物理约束对齐。代码已发布在附录 C。
英文摘要:
The transition toward localized intelligence through Small Language Models (SLMs) has intensified the need for rigorous performance characterization on resource-constrained edge hardware. However, objectively measuring the theoretical performance ceilings of diverse architectures across heterogeneous platforms remains a formidable challenge. In this work, we propose a systematic framework based on the Roofline model that unifies architectural primitives and hardware constraints through the lens of operational intensity (OI). By defining an inference-potential region, we introduce the Relative Inference Potential as a novel metric to compare efficiency differences between Large Language Models (LLMs) on the same hardware substrate. Extensive empirical analysis across diverse compute tiers reveals that variations in performance and OI are significantly influenced by sequence length. We further identify a critical regression in OI as model depth increases. Additionally, our findings highlight an efficiency trap induced by hardware heterogeneity and demonstrate how structural refinements, such as Multi-head Latent Attention (MLA), can effectively unlock latent inference potential across various hardware substrates. These insights provide actionable directions for hardware-software co-design to align neural structures with physical constraints in on-device intelligence. The released code is available in the Appendix C.
LLM Inference Unveiled: Survey and Roofline Model Insights
Infinigence-AI(智源人工智能);Illinois Institute of Technology(伊利诺伊理工学院);Carnegie Mellon University(卡内基梅隆大学);University of California, Berkeley(加利福尼亚大学伯克利分校);Peking University(北京大学);Tencent AI Lab(腾讯人工智能实验室);Institute of Automation, CAS(中国科学院自动化研究所);University of Wisconsin, Madison(威斯康星大学麦迪逊分校)
DABench-LLM: Standardized and In-Depth Benchmarking of Post-Moore Dataflow AI Accelerators for LLMs
Dept. of Computer Science Stevens Institute of Technology(计算机科学系 斯坦福理工学院);Dept. of Computer Science Binghamton University(计算机科学系 哈伯里顿大学);Engineering The Ohio State University(工程学 俄亥俄州立大学);Learning Division Argonne National Laboratory(学习部 阿贡国家实验室)
School of Technology Management and Engineering, NMIMS(NMIMS技术管理与工程学院);Indian Institute of Technology, Roorkee(鲁尔基印度理工学院);Birla Institute of Technology and Science, Pilani (BITS Pilani)(皮拉尼贝拉理工学院(BITS Pilani))
INTEGRALBENCH: Benchmarking LLMs with Definite Integral Problems
School of Software Engineering, Tongji University, Shanghai, China(同济大学软件工程学院);Polytechnic Institute, Zhejiang University, Zhejiang, China(浙江大学 polytechnic 院);ETH Zurich, Zurich, Switzerland(苏黎世联邦理工学院);Department of Computer Science(计算机科学系);Engineering, Hong Kong University of Science(科学大学工程学院);School of Mathematics(数学学院);Physics, Xi’an Jiaotong Liverpool University, Suzhou, China(西安交通大学利物浦大学物理学院)
Benchmarking LLMs' Mathematical Reasoning with Unseen Random Variables Questions
The Hong Kong Polytechnic University(香港理工大学);University of Electronic Science and Technology of China(电子科技大学);Tencent Youtu Lab(腾讯优图实验室);Beihang University(北京航空航天大学);Simon Fraser University(西蒙弗雷泽大学)
PreAct-Bench: Benchmarking Predictive Monitoring in LLMs
King’s College London(伦敦国王学院);National University of Singapore(新加坡国立大学);Southern University of Science and Technology(南方科技大学);Thomson Reuters Foundational Research(汤姆森路透基础研究);Imperial College London(伦敦帝国学院);The Alan Turing Institute(艾伦·图灵研究所)
CANDY: Benchmarking LLMs' Limitations and Assistive Potential in Chinese Misinformation Fact-Checking
School of Cyber Science and Engineering, Sichuan University, China(四川大学网络科学与工程学院);College of Computer Science, Sichuan University, China(四川大学计算机学院);Institute of Data Science, National University of Singapore, Singapore(新加坡国立大学数据科学研究所)
VoxEmo: Benchmarking Speech Emotion Recognition with Speech LLMs
Department of Computer Science, University of Sheffield, United Kingdom(英国谢菲尔德大学计算机科学系);Signal Analysis and Interpretation Laboratory (SAIL), Ming Hsieh Department of Electrical and Computer Engineering, University of Southern California, Los Angeles, CA 90089, USA(美国南加州大学电气与计算机工程系信号分析与解释实验室(SAIL))
Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMs
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Guangzhou HKUST Fok Ying Tung Research Institute(广州香港科技大学霍英东研究院);The Hong Kong University of Science and Technology(香港科技大学);AI Thrust(AI 方向)
BioCoref: Benchmarking Biomedical Coreference Resolution with LLMs
Computational Bioscience Program University of Colorado Anschutz Medical Campus(科学生物学程序,科罗拉多大学安舒茨医学校区);Department of Pediatrics University of Chicago(儿科学系,芝加哥大学)
SecBench: A Comprehensive Multi-Dimensional Benchmarking Dataset for LLMs in Cybersecurity
The Hong Kong Polytechnic University(香港理工大学);Tencent Security Keen Lab(腾讯安全科恩实验室);Tencent Zhuque Lab(腾讯朱雀实验室);Tencent Security Platform and Department(腾讯安全平台部)
本文提出网络安全多维基准数据集 SecBench,覆盖多题型、能力层级、语言与子领域,并借助 LLM 完成标注和 SAQ 自动评分,在 16 个 SOTA 模型上验证了其可用性。