Original title: Compile by Training: Turning Natural-Language Specifications into Local Neural Functions
Yuntian Deng, Pengyu Nie, Stuart Shieber · September 2026
Writing code for routine text tasks is hard, but asking a giant remote artificial intelligence every single time is slow, expensive, and leaves you dependent on an outside provider. Researchers built an alternative called compile by training. It turns a plain-English request into a small, reusable local function. During the setup phase, larger teacher models create practice examples for the task. Those examples train a tiny add-on piece, called an adapterA tiny customizable part of the model that gets adjusted for a specific task., for a compact program that runs the instructions. Once trained, this new mini-program runs entirely on its own without the big models. It acts like normal software you can save and combine. In tough tests where an earlier fast tool got zero exact matches, this method scored 83.6% semantic accuracy.
Imagine you have a favorite recipe that you want to share with a friend, but you can't just give them the ingredients list; you have to explain it in words each time. The problem is that every time your friend tries to cook from your description, they get slightly different results, and you have to keep guiding them. In this paper, instead of explaining the recipe repeatedly, you create a small, written instruction card that your friend can follow without calling you. Here, the natural language description is like your verbal recipe, and the compiled neural function is like the instruction card that works reliably on its own.
For anyone who needs custom text processing, this means faster, cheaper functions that don't require constant internet access. It lets developers create and share small AI tools without big cloud dependencies.
The compile-by-training method has a higher time cost during compilation, taking roughly a minute compared to seconds for some alternatives. Its performance is only demonstrated on a specific subset of benchmarks, so it may not generalize to all tasks. It still depends on teacher models during training, which could limit its independence.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
Compile by Training: Turning Natural-Language Specifications into Local Neural Functions — Yuntian Deng, Pengyu Nie, Stuart Shieber
Abstract licence: CC0
Explanation generated by Synthesis from the abstract — it is not the original paper. This is a preprint, so it hasn't necessarily been peer reviewed.