模型訓練與開發工具
Compile by Training Compiles Natural-Language Specifications into Reusable Offline Neural Functions
A new method first uses a teacher model to synthesize task data, then fine-tunes adapters for a small interpreter, packaging text specifications as versionable `.paw` functions. It achieves 83.6% semantic accuracy on difficult, ambiguous text tasks, but compilation requires an external model and roughly 40GB of accelerator memory, and it cannot provide the formal guarantees of conventional programs.

Researchers have introduced Compile by Training, a method that turns text tasks—such as “classify customer-support messages” and “repair formatting”—that are easy to describe in natural language but difficult to implement comprehensively with rules into reusable local neural functions. Rather than asking a large model to generate Python code, it first initializes weights using an existing fast Program-as-Weights compiler. A GPT-like teacher model then synthesizes inputs and answers from the specification, which are used to fine-tune adapters for a shared 0.6B-parameter PAW interpreter. Finally, the task capability is packaged as a `.paw` adapter that can be stored, version-controlled, and composed.
This design shifts the cost from each remote-model call to a one-time “compilation” stage. The public implementation caches teacher-generated results. After the shared interpreter is downloaded for the first time, inference can run locally without sending actual inputs to the teacher service. On FuzzyBench-Hard—a subset that the fast compiler cannot answer exactly—the paper reports 83.6% semantic accuracy, at the cost of increasing compilation time from several seconds to about one minute. The official SDK also states that a standard program file is approximately 22MB, making the approach suitable for high-volume classification, extraction, or routing tasks with constrained output spaces.
The engineering limitations are equally clear. The open-source recipe still requires an OpenAI API key, and default training requires roughly 40GB of accelerator memory. “Offline,” therefore, describes only inference after compilation is complete. Unlike conventional source code, the weights are also difficult to inspect, and type checking cannot prove correct behavior when inputs are out of distribution, specifications conflict, or specifications are revised. The team has released a single-file training implementation and an MIT-licensed library, but the 83.6% figure remains an author-reported result on a custom difficult subset. Prospective adopters should next validate edge cases using an independently labeled test set and determine when compilation, GPU, and maintenance costs genuinely become lower than the cost of continuously calling large models.