跳到正文
arXiv cs.CL· Jarrod Ragsdale, Rajendra Boppana·· 12 小时前AI 评分20

小语言模型 shell 输出模拟的模板缺口重建(TGR)

Template Gap Reconstruction for Shell Output Simulation with Small Language Models

AI 导读

研究者提出模板缺口重建(TGR),用可复用输出字面量加哨兵标记、由自回归生成填补缺口,并训练模板选择器与五个基于不同小语言模型检查点的重建模型。在 1870 万条异构执行环境输出构建的模板库上评测,当最优模板覆盖率超过 25% 时,TGR 的输出编辑相似度(O-ES)优于全输出解码(FOD);短缺口序列下两者 O-ES 分别为 0.964 和 0.812。

正文 · 原文

View PDF HTML (experimental)

Abstract:Small language models offer a compact basis for shell simulation without executing submitted commands, but full-output decoding requires them to predict recurring utility structure alongside content that varies across executions. We introduce template gap reconstruction (TGR), which supplies reusable output literals interspersed with sentinels to be interleaved with autoregressively generated gaps. A template selector chooses which template to be reconstructed, with the empty template retaining full-output decoding. We construct a template bank from 18.7 million outputs collected across heterogeneous execution environments and train a template selector and five reconstruction models initialized from various small language model checkpoints on a target environment excluded from bank construction. Evaluation demonstrates that TGR improves output edit similarity (O-ES) over full-output decoding (FOD) when the optimal template covers more than 25\% of the template, while performing similarly for lower-coverage outputs. Additionally, TGR outperforms FOD for shorter gap sequences, with O-ES values of 0.964 and 0.812, respectively, while maintaining similar performance for longer sequences. TGR reduces the number of tokens generated by 26.3--38.3\% across used tokenizer families. These results support using a reusable output structure as a practical design choice for small shell simulators, improving response fidelity and shortening generation targets while keeping template selection and residual prediction central to response quality.
Comments: 25 pages, 7 figures, 12 tables, conference preprint
Subjects: Machine Learning (cs.LG); Computation and Language (cs.CL)
Cite as: arXiv:2611.06731 [cs.LG]
  (or arXiv:2611.06731v1 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2611.06731

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Jarrod Ragsdale [view email]
[v1] Wed, 4 Nov 2026 16:17:28 UTC (1,135 KB)

来源:arXiv cs.CL · arxiv.org