Compile natural language specs into tiny neural functions that run locally.
Website · Docs · Program Hub · Agents · Discussions
pip install programasweights --extra-index-url https://pypi.programasweights.com/simple/import programasweights as paw
# Compile a natural language spec into a neural function
program = paw.compile(
"Classify if this message requires immediate attention or can wait",
)
# Load and run locally — no internet needed after download
fn = paw.function(program.id)
fn("Server is down, customers affected!") # → "immediate"
fn("Newsletter: spring picnic Friday") # → "can wait"Once compiled, functions run offline — no API keys, no internet, no per-call cost.
- Classification — sentiment, urgency, intent routing
- Extraction — emails, names, dates from unstructured text
- Format repair — fix broken JSON, normalize dates
- Fuzzy search — typo-tolerant matching, near-duplicate detection
- Agent preprocessing — parse tool calls, validate outputs, route tasks
Programs compiled with the Compact interpreter also run in the browser via WebAssembly — no server needed, data stays on the user's device.
npm install @programasweights/webimport paw from '@programasweights/web';
const fn = await paw.function('programasweights/email-triage');
await fn('Server is down!'); // → "immediate"| Repo | Description |
|---|---|
| programasweights-python | Python SDK |
| programasweights-js | Browser SDK |
| wllama | WebAssembly llama.cpp fork with LoRA + KV cache support |
| Standard (Qwen3 0.6B) | Compact (GPT-2 124M) | |
|---|---|---|
| Accuracy | Higher | Lower |
| Program size | ~22 MB | ~5 MB |
| Runs in browser | No | Yes |