Compile by Training: Turning Natural-Language Specifications into Local Neural Functions

Hugging Face Daily Papers Papers

Summary

This paper introduces 'Compile by Training', a method that compiles natural-language function descriptions into local neural programs using teacher model synthesis and fine-tuning, achieving 83.6% semantic accuracy on FuzzyBench.

Many recurring text functions are easy to describe but difficult to implement with rules, while calling a large remote model for every input introduces repeated cost, latency, and dependency on a provider. We present compile by training, which turns a natural-language specification into a reusable neural function. At compile time, teacher models generate task-specific examples that are used to train a small adapter for a compact interpreter. The resulting function runs without the teachers and can be stored, versioned, and composed like ordinary software. On FuzzyBench-Hard, a subset on which the Program-as-Weights fast compiler produced no exact matches, compile by training reaches 83.6% semantic accuracy. This higher accuracy comes with a higher compile-time cost: roughly a minute rather than seconds for the fast compiler. We deploy the compiler in a public interactive service and demonstrate compiled functions in a multi-site website helper, a language-controlled 3D avatar, and a bidirectional English-Claudish translator.
Original Article
View Cached Full Text

Cached at: 09/04/26, 07:56 AM

Paper page - Compile by Training: Turning Natural-Language Specifications into Local Neural Functions

Source: https://huggingface.co/papers/2609.04199 What if LLMs built reusable tools instead of solving the same task over and over?

**Program-as-Weights (PAW)**compiles a natural-language function description into a small neural program that runs on a shared 0.6B local interpreter. Our original compiler does this in a single forward pass, so compilation takes only seconds.

This work, Compile by Training, adds a higher-accuracy mode: teacher models synthesize task-specific examples at compile time, then about a minute of finetuning specializes the program. On a hard subset of FuzzyBench where the fast PAW compiler did not produce exact-match outputs, Compile by Training reaches 83.6% semantic accuracy.

Both compilers produce reusable PAW programs that can be called locally like regular Python functions.

https://huggingface.co/papers/2609.04199#examplesExamples

🗣️Claudish— English ↔ Claude-style prose https://programasweights.com/claudish

🤖Avatar Director— natural language → action programs for a live 3D character https://programasweights.com/avatar

🔒PII Masker— detect and mask personal information locally https://programasweights.com/pii

Try the higher-accuracy compiler: https://programasweights.com/playground?compiler=paw-ft-bs48

Similar Articles