# Compile by Training — turn an English spec into a local neural function

> Describe a fuzzy text function in English, wait about a minute, and get a .paw file that runs locally with no API calls.

- Org: ProgramAsWeights
- Date: 2026-09-03
- Category: paper, algorithm, tool
- Source: https://arxiv.org/abs/2609.04199
- Canonical page: https://ai-tldr.dev/releases/programasweights-compile-by-training/

## In short

Compile by Training is a compiler that turns a plain-English function description into a small neural program you can run offline. It reaches 83.6% semantic accuracy on FuzzyBench-Hard, where the older fast compiler scored 22.4%.

## What it is

Compile by Training is a new, slower compiler for ProgramAsWeights (PAW) that trades compile speed for a large jump in accuracy. It takes a natural-language description of what a function should do and produces a reusable neural program. The paper is by Yuntian Deng, Pengyu Nie and Stuart Shieber, posted to arXiv on 3 September 2026.

## How it works

During compilation, teacher models generate example input-output pairs for the spec. Those examples finetune a compact adapter over a small fixed interpreter, and the result is packaged as a .paw file. Running that file needs no further model calls. On FuzzyBench-Hard the method scores 83.6% LLM Exact Match against 22.4% for the PAW fast compiler, and compiling takes 50.9 seconds on a B300 GPU versus 3.5 seconds for the fast path.

## Why it matters

Small fuzzy text jobs — sentiment labels, PII typing, format cleanup — usually mean one API call per invocation. ProgramAsWeights turns each of those into a local file with a name and a version, so it can be stored and reused like any other module. The authors show it driving a website helper, 3D avatar control and a two-way translator.

## Who it's for

developers shipping small text-processing features

## Try it

uv run compile.py "Classify sentiment. Return only positive, negative, or neutral." -o sentiment.paw

## Links

- [Paper](https://arxiv.org/abs/2609.04199)
- [Code](https://github.com/programasweights/compile-by-training)
- [Demo](https://programasweights.com/playground?compiler=paw-ft-bs48)
- [Python SDK](https://github.com/programasweights/programasweights-python)
- [HF Papers](https://huggingface.co/papers/2609.04199)
