mlsanityData to 14 Oct 2026

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

arXiv 2607.20456 ↗First posted 14 May 2026cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models excel at code generation for mainstream programming languages but struggle with rare, domain-specific languages such as MiniZinc, a constraint modeling language for combinatorial problems. We investigate whether targeted fine-tuning can teach small language models (0.6B to 20B parameters) to generate syntactically correct and semantically valid MiniZinc models from natural language problem descriptions. Our key finding is that syntax errors dominate failures when working with this domain specific language: the out-of-the-box execution accuracy of small language models such as Qwen3, LLaMa, Gemma, and GPT-OSS is near-zero. We propose a cross-model error bootstrapping approach that collects syntax errors from multiple LLM runs and leverage those to curate an error correction training dataset. This dataset allows us fine-tune small language models that consistently improves both direct code generation and chain-of-thought approaches across all model sizes. With self-reflection and ensembling, our approach achieves up to 98% execution accuracy. In parallel, solution accuracy still remains at 35%, indicating that while syntax is learnable, constraint reasoning remains a challenge. We contribute our fine-tuning pipeline, datasets, and models to opens-source for further research on text-to-model translation.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 11 of its 25 references that are in the map. First posted on arXiv 14 May 2026.

Builds on

11 of 25 references.

References · 11

  1. 2024ORLM: A Customizable Framework in Training Large Models for Automated Optimization Modelingcited by 124
  2. 2024LLMOPT: Learning to Define and Solve General Optimization Problems from Scratchcited by 102
  3. 2022Augmenting Operations Research with Auto-Formulation of Optimization Models from Problem Descriptionscited by 54
  4. 2024OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scalecited by 38
  5. 2024Planetarium: A Rigorous Benchmark for Translating Text to Structured Planning Languagescited by 33
  6. 2023Holy Grail 2.0: From Natural Language to Constraint Modelscited by 26
  7. 2023Synthesizing mixed-integer linear programming models from natural language descriptionscited by 18
  8. 2026Large-Scale Optimization Model Auto-Formulation: Harnessing LLM Flexibility via Structured Workflowcited by 13
  9. 2025Text2Zinc: A Cross-Domain Dataset for Modeling Optimization and Satisfaction Problems in MiniZinccited by 7
  10. 2025DualSchool: How Reliable are LLMs for Optimization Education?cited by 4
  11. 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languagescited by 4

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2023Don't Fine-Tune, Decode: Syntax Error-Free Tool Use via Constrained Decoding
  2. 2025Gala: Global LLM Agents for Text-to-Model Translation
  3. 2025SLMFix: Leveraging Small Language Models for Domain Specific Language Error Fixing with Reinforcement Learning
  4. 2024CodeLutra: Boosting LLM Code Generation via Preference-Guided Refinement
  5. 2026SLM Finetuning for Natural Language to Domain Specific Code Generation in Production
  6. 2023L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Models
  7. 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation
  8. 2024Low-Cost Language Models: Survey and Performance Evaluation on Python Code Generation