Context-Instrumental Data Distillation for Kubernetes Manifest Generation: Method and Experimental Evaluation

2026-05-25Machine Learning

Machine LearningArtificial Intelligence
AI summary

The authors studied how to teach smaller language models (up to 4 billion parameters) to write code for specific technical tasks, focusing on Kubernetes configuration files. They created a special training method that uses both artificially made data and carefully checked real examples to help the models learn. Their tests showed that making sure the model follows strict format rules is more important for success than just adding more training data. They demonstrated this on a smaller-scale setup and achieved a high accuracy rate. This suggests careful data preparation can be more effective than simply increasing data quantity for these tasks.

Small Language ModelsDomain-Specific LanguagesKubernetes ManifestsData DistillationSynthetic Data GenerationKnowledge DistillationSupervised Fine-TuningLoRAValidationModel Specialization
Authors
Andrey Kozachok, Anatoliy Bakaev, Aleksandr Kozachok, Shamil Magomedov, Artem Noev
Abstract
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.