The "compile by training" framework introduces a method for transforming natural-language specifications into efficient, reusable, and local neural functions. To address the latency, cost, and dependency issues inherent in calling large remote models for repetitive text tasks, this approach utilizes a teacher model to generate task-specific training examples during a compilation phase. These examples are then used to train a small adapter for a compact interpreter. Unlike rule-based implementations, the resulting compiled functions operate independently of the original teacher models and can be versioned or composed like standard software. Performance evaluations on the FuzzyBench-Hard benchmark—a challenging subset where the Program-as-Weights fast compiler failed to produce exact matches—demonstrate that compile by training achieves a semantic accuracy of 83.6%. While this method requires a higher compile-time investment—approximately one minute compared to the seconds required by the fast compiler—the trade-off provides significantly higher precision. The authors demonstrate the practical utility of these compiled functions through various deployments, including a multi-site website helper, a language-controlled 3D avatar, and a bidirectional English-Claudish translator.
Read original
huggingface/daily-papers