Papers
arxiv:2607.02512

Program-as-Weights: A Programming Paradigm for Fuzzy Functions

Published on Jul 2
· Submitted by
Yuntian Deng
on Jul 3
#1 Paper of the day
Authors:
,
,
,
,
,

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-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.

Community

Define functions in English → ProgramAsWeights (PAW) compiles them into neural programs → call them like ordinary Python functions.

PAW enables:
🎮 Alien Taboo: give an alien free-form clues and see whether it can guess your secret word
🤖 Avatar Director: describe an action in natural language and watch a 3D character perform it
🌳 Website Helper: ask questions about a website and get grounded answers with relevant information and links

Using PAW in Python:

import programasweights as paw

# Compile an English description into a local function.
fn = paw.compile_and_load(
    "Classify if a message needs immediate attention or can wait"
)

# After compilation, inference runs locally with no API calls.
fn("Thesis defense moved to 3pm, need your signature today")
# "immediate"

You can easily use PAW with a coding agent in either of two ways:

Ask it to read the agent guide:
https://programasweights.com/AGENTS.md

Or install the skill:

npx skills add programasweights/skills

For example, use this prompt to build a website helper:

I want to add an “ask about my website” helper to my site using paw-helper, powered by ProgramAsWeights. Read the setup guide at https://programasweights.com/paw-helper/AGENTS.md and help me create, compile, and deploy a content pack for my website.

My site: [Describe what it is about, the key links, and what visitors should be able to ask.]

Sign up or log in to comment

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 paper 2

Datasets citing this paper 1

Spaces citing this paper 0

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 paper 1