Program-as-Weights: A Programming Paradigm for Fuzzy Functions
Summary
Program-as-Weights (PAW) introduces a programming paradigm where a 4B compiler translates natural-language specifications into compact neural artifacts executable by a 0.6B interpreter, achieving performance comparable to 32B models with drastically lower memory and inference cost.
View Cached Full Text
Cached at: 07/03/26, 03:52 AM
Paper page - Program-as-Weights: A Programming Paradigm for Fuzzy Functions
Source: https://huggingface.co/papers/2607.02512
Abstract
Fuzzy-function programming compiles natural-language specifications into compact neural artifacts using a 4B compiler and 0.6B interpreter, achieving efficient, local execution with reduced memory usage and faster inference.
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-executableneural artifact. We instantiate this paradigm withProgram-as-Weights(PAW), in which a 4B compiler trained onFuzzyBench, a 10M-example dataset we release, emitsparameter-efficient adaptersfor 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 thefoundation modelfrom a per-input problem solver into atool builder: invoked once per function definition, it produces a small reusable artifact whose subsequent calls per function application are cheap and offline.
View arXiv pageView PDFProject pageGitHub92Add to collection
Get this paper in your agent:
hf papers read 2607\.02512
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper2
#### programasweights/paw-4b-qwen3-0.6b Text Generation• Updatedabout 1 hour ago • 2
#### programasweights/paw-4b-gpt2 Text Generation• Updatedabout 1 hour ago • 1
Datasets citing this paper1
#### yuntian-deng/fuzzy_bench_verified Viewer• Updatedabout 1 hour ago • 50.7k • 15 • 1
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2607.02512 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
@_akhaliq: Program-as-Weights A Programming Paradigm for Fuzzy Functions
Introduces 'Program-as-Weights', a new programming paradigm designed for fuzzy functions, shared by @_akhaliq.
[R] Compiling Agentic Workflows into LLM Weights: Near-Frontier Quality at Two Orders of Magnitude Less Cost
This paper demonstrates that compiling agentic workflow procedures into the weights of a small fine-tuned model achieves near-frontier quality at 128–462× cost reduction compared to in-context baselines, addressing perceived barriers of quality, cost, and flexibility.
prism-ml/Bonsai-27B-gguf
Prism ML releases Bonsai-27B-gguf, a 27-billion parameter language model with binary (1.125-bit) weights, achieving a ~14x size reduction while retaining ~90% of FP16 reasoning performance. It runs on consumer hardware with high throughput.
@PatrickToulme: This exercise makes me believe the future of DSLs and compilers is very much agentic. Programming languages and DSLs bu…
Claude Fable used the pyptx DSL to write a FlashAttention forward kernel for NVIDIA B200 that achieves near-parity performance with the hand-tuned CUTLASS kernel, demonstrating the potential for AI agents in compiler and DSL design.
Variable Bit-width Quantization: Learning Per-Group Precision for "Bigger-but-Smaller" Language Models
Introduces Variable Bit-width Quantization (VBQ), a training-time method where each group of 64 weights learns its own bit-width (1,2,4,8) via Gumbel-Softmax relaxation. VBQ discovers a heterogeneous allocation that yields a 'bigger-but-smaller' regime, e.g., a 131M parameter model at 1.82 mean bits beats a 55M FP16 model while using less storage, and a 1.46B model matches a 593M FP16 with ~3.7x less storage.