构建首个开源大模型生成长度数据集,揭示不同模型响应长度的分布规律。
CASTILLO: Characterizing Response Length Distributions of Large Language Models
- 收集13个主流开源模型在7个指令数据集上的生成长度数据
- 每组提示-模型组合生成10次,统计均值、标准差和分位数
- 适合研究推理调度与模型生成行为的系统与算法开发者
大型语言模型(LLM)推理中的计算资源高效管理面临挑战,主要源于自回归文本生成的随机性与长度可变性。提前准确估计响应长度有助于主动分配资源,但现有方法或偏向特定长度,或依赖忽略模型与提示特异性差异的假设。本文提出CASTILLO,一个涵盖13个广泛使用的开源LLM在7个不同指令跟随数据集上的响应长度分布数据集。对每个⟨提示, 模型⟩样本对,采用固定解码参数生成10次独立完成,记录每次响应的词元长度,并发布均值、标准差、分位数、最短与最长生成结果及具体生成设置。分析显示,响应长度存在显著的模型间与模型内差异(即使在相同生成设置下),且不同模型表现出特定生成行为,部分响应中出现局部文本退化现象。CASTILLO支持预测模型开发以实现主动调度,并提供系统性框架分析模型特异性生成行为。数据集与代码已公开,推动生成语言建模与系统研究的交叉发展。
原文摘要 · Abstract (English)
Efficiently managing compute resources for Large Language Model (LLM) inference remains challenging due to the inherently stochastic and variable lengths of autoregressive text generation. Accurately estimating response lengths in advance enables proactive resource allocation, yet existing approaches either bias text generation towards certain lengths or rely on assumptions that ignore model- and prompt-specific variability. We introduce CASTILLO, a dataset characterizing response length distributions across 13 widely-used open-source LLMs evaluated on seven distinct instruction-following corpora. For each $\langle$prompt, model$\rangle$ sample pair, we generate 10 independent completions using fixed decoding hyper-parameters, record the token length of each response, and publish summary statistics (mean, std-dev, percentiles), along with the shortest and longest completions, and the exact generation settings. Our analysis reveals significant inter- and intra-model variability in response lengths (even under identical generation settings), as well as model-specific behaviors and occurrences of partial text degeneration in only subsets of responses. CASTILLO enables the development of predictive models for proactive scheduling and provides a systematic framework for analyzing model-specific generation behaviors. We publicly release the dataset and code to foster research at the intersection of generative language modeling and systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。