通过全序列掩码训练,让扩散语言模型能自动补全提示模板。
Unlocking Prompt Infilling Capability for Diffusion Language Models
- 训练时同时掩码提示和回复,打破传统只掩码回复的限制。
- 自动生成的提示在效果上不逊于人工设计,且跨模型迁移性强。
- 适合需要高效提示工程的研究者和开发者使用。
掩码扩散语言模型(dLMs)通过双向去噪生成文本,但其在补全提示(infilling)方面的能力长期受限。这一局限源于当前监督微调(SFT)中仅对回复部分进行掩码的惯例。为解锁该能力,我们提出在SFT阶段采用全序列掩码,即同时掩码提示与回复。一旦激活,模型可根据少量示例补全提示模板中的缺失部分。实验表明,模型生成的提示在性能上可媲美甚至超越人工设计的模板,在不同模型间具有良好迁移性,并与现有提示优化方法互补。结果表明,制约掩码扩散语言模型提示补全能力的主要瓶颈是训练方式,而非架构限制。
原文摘要 · Abstract (English)
Masked diffusion language models (dLMs) generate text through bidirectional denoising, yet this capability remains locked for infilling prompts. This limitation is an artifact of the current supervised finetuning (SFT) convention of applying response-only masking. To unlock this capability, we extend full-sequence masking during SFT, where both prompts and responses are masked jointly. Once unlocked, the model infills masked portions of a prompt template conditioned on few-shot examples. We show that such model-infilled prompts match or surpass manually designed templates, transfer effectively across models, and are complementary to existing prompt optimization methods. Our results suggest that training practices, not architectural limitations, are the primary bottleneck preventing masked diffusion language models from infilling effective prompts
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。