Learn2Zinc: Fine-tuning Small Language Models for Text-to-Model Translation in MiniZinc

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

Learn2Zinc introduces a fine-tuning methodology for small language models (SLMs) ranging from 0.6B to 20B parameters to generate MiniZinc constraint models from natural language. Initial tests revealed near-zero execution accuracy (0.0-6.0%) for models like Qwen3, LLaMa, Gemma, and GPT-OSS on this domain-specific language. The proposed cross-model error bootstrapping approach collects syntax errors from multiple LLM runs to create an error correction training dataset. This strategy, combined with self-reflection and ensembling, boosts execution accuracy to 98%, effectively solving the MiniZinc syntax problem. However, solution accuracy remains at 35%, highlighting that semantic constraint reasoning is still a significant challenge. The project open-sources its fine-tuning pipeline, datasets, and models.

Key takeaway

For Machine Learning Engineers developing solutions for domain-specific languages like MiniZinc, relying on out-of-the-box or even chain-of-thought LLMs is insufficient due to pervasive syntax errors. You should prioritize targeted fine-tuning with error correction datasets, potentially generated via cross-model bootstrapping, and implement self-reflection loops to achieve high execution accuracy. Recognize that while syntax is largely solvable, improving semantic reasoning for complex constraint modeling remains a critical area for further research and development.

Key insights

Targeted fine-tuning with error correction enables small language models to master domain-specific language syntax.

Principles

Method

A cross-model error bootstrapping approach collects LLM syntax errors, uses GPT-5.2 for minimal fixes, and combines with grammar-based synthetic corruptions to create an error correction dataset for fine-tuning.

In practice

Topics

Code references

Best for: NLP Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.