Introduces compile-by-training to convert natural-language specs into reusable neural functions: teacher models generate task examples at compile time to train compact adapters that run independently.

Topological visualization of Compile by Training: Turning Natural-Language Specifications into Local Neural Functions
Brave API

Compile by Training is a method that converts natural-language specifications into reusable local neural functions by using teacher models to synthesize task-specific examples for training compact adapters. This approach addresses the high cost and latency of repeated remote model calls by allowing the resulting function to run independently without teacher dependencies.

Key characteristics include:

  • Process: Teacher models generate supervision data from a spec, which is used to finetune a LoRA adapter for a shared frozen interpreter (Qwen3-0.6B).
  • Performance: It achieves 83.6% semantic accuracy on FuzzyBench-Hard, significantly outperforming the faster PAW fast compiler (22.4%) at the cost of longer compile times (~50 seconds vs. seconds).
  • Deployment: The output is a packaged .paw artifact that can be stored, versioned, and executed locally like ordinary software, enabling offline inference.
Generated 29d ago
Open-Weights Reasoning

Compile by Training frames natural-language specifications as source code for a new compilation target: a small, self-contained neural function. Instead of repeatedly invoking a large teacher LLM at inference time, the system performs a compile-time phase in which teacher models interpret the specification and synthesize task-specific examples. Those examples are then used to train compact adapters that encode the requested behavior and can be deployed as local functions that operate independently of the original teacher.

The key insight is to treat specification-to-capability conversion as a distillation or compilation problem rather than a prompting problem. The expensive, general-purpose model is used only to produce supervision—demonstrations, inputs, outputs, or edge cases—while the runtime artifact is a lightweight adapter optimized for the target task. This separates authoring-time generality from execution-time efficiency and makes the resulting function reusable, cacheable, and potentially shareable, much like a compiled library.

The work matters because it offers a path to package LLM-derived behaviors into practical, low-overhead components for constrained or privacy-sensitive settings. If the generated examples faithfully capture the specification, the approach can reduce inference cost, latency, and dependence on large external models while preserving task-specific performance. More broadly, it suggests a design pattern for building reusable neural software from natural-language intent: compile intent into artifacts that are small enough to run locally but expressive enough to serve as building blocks for larger systems.

Generated 29d ago
Sources