Paper 2607.02512
Program-as-Weights: A Programming Paradigm for Fuzzy Functions
- Published
- Jul 2026
- Research lab
- Independent
- Citations
- 0
- GitHub
- Not linked
01 In brief
Summary
The paper introduces Program-as-Weights (PAW), a paradigm for implementing fuzzy functions (tasks like log filtering or intent classification) by compiling natural-language specifications into compact neural programs.
A 4B compiler, trained on the new FuzzyBench dataset (10M examples), emits a hybrid program: a discrete pseudo-program (paraphrase plus examples) and a continuous LoRA adapter.
A frozen 0.6B Qwen3 interpreter executes these programs locally, achieving 73.78% exact match on FuzzyBench, outperforming direct prompting of Qwen3-32B (68.70%) while using ~50x less inference memory and running at 30 tokens/s on a MacBook M3.
The compiler-interpreter abstraction extends to image-conditioned tasks by swapping the compiler for a vision-language model.
Ablations show compiler-generated LoRA outperforms full fine-tuning and fixed LoRA, and the pseudo-program provides robustness to noisy specifications.
The work positions PAW as a step toward small-model runtimes where large models compile and small models execute, with applications in log monitoring, site navigation, search reranking, tool calling, and games.
Limitations include coupled compiler-interpreter pairs and opaque continuous components.
Code and demo are publicly available.
02 From the paper
Abstract
Many everyday programming tasks resist clean rule-based implementation, such as alerting on important log lines, repairing malformed JSON, or ranking search results by intent, and are increasingly outsourced to large language model APIs at the cost of locality, reproducibility, and price. We propose fuzzy-function programming: compiling such a function from a natural-language specification into a compact, locally-executable neural artifact. We instantiate this paradigm with Program-as-Weights (PAW), in which a 4B compiler trained on FuzzyBench, a 10M-example dataset we release, emits parameter-efficient adapters for a frozen, lightweight interpreter. A 0.6B Qwen3 interpreter executing PAW programs matches the performance of direct prompting of Qwen3-32B, while using roughly one fiftieth of the inference memory and running at 30 tokens/s on a MacBook M3. PAW reframes the foundation model from a per-input problem solver into a tool builder: invoked once per function definition, it produces a small reusable artifact whose subsequent calls per function application are cheap and offline.