面向Kubernetes清单生成的上下文-工具数据蒸馏方法及实验评估
Context-Instrumental Data Distillation for Kubernetes Manifest Generation: Method and Experimental Evaluation
AI总结:
提出上下文-工具数据蒸馏方法,通过合成生成和反向指令生成构建语料库,结合外部验证器过滤,在资源受限条件下微调1.5B参数小语言模型生成Kubernetes清单,实验表明严格输出格式比增加训练样本更关键。
摘要:
本文研究了参数高达40亿的小语言模型(SLM)在领域特定语言(DSL)中生成工件的专业化。选择Kubernetes清单作为目标领域。我们提出了上下文-工具数据蒸馏方法:源语料库通过合成生成形成,在扩展方案中通过从真实Kubernetes YAML文件进行反向指令生成,仅当通过外部验证器并匹配领域上下文模型时,才将配对包含在训练中。与经典的KL散度知识蒸馏不同,基线实现简化为在工具验证示例上进行监督微调。实验部分在资源受限条件下展示了试点实现:DeepSeek-V4 Flash API作为教师模型进行合成生成,而Qwen2.5-Coder-1.5B-Instruct通过LoRA在CPU上进行微调。在K8s-Distill-Pilot语料库(训练1200,验证100,测试200)上,我们以更严格的提示公式和max_new_tokens=768实现了full-pass@1 = 91.5%(183/200)。关键经验发现是,对于Kubernetes YAML,试点中的结果质量更多地取决于严格的输出格式要求,而不是简单地增加训练样本数量。
英文摘要:
This paper examines the specialization of Small Language Models (SLMs) with up to 4 billion parameters for generating artifacts in domain-specific languages (DSL). Kubernetes manifests are chosen as the target domain. We propose the context-instrumental data distillation method: the source corpus is formed through synthetic generation and, in an extended scheme, through reverse instruction generation from real Kubernetes YAML files, with pairs included in training only upon passing external validators and matching the domain context model. Unlike classical KL-divergence knowledge distillation, the baseline implementation reduces to supervised fine-tuning on instrumentally verified examples. The experimental section presents a pilot implementation under resource-constrained conditions: the DeepSeek-V4 Flash API serves as the teacher for synthetic generation, while Qwen2.5-Coder-1.5B-Instruct is fine-tuned via LoRA on CPU. On the K8s-Distill-Pilot corpus (train_1200, validation_100, test_200), we achieved full-pass@1 = 91.5% (183/200) with a stricter prompt formulation and max_new_tokens=768. The key empirical finding is that for Kubernetes YAML, result quality in the pilot depended more on strict output format requirements than on simply increasing the number of training examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。