Classification
Assign messages to categories you define, such as billing, access, or cancellation. Return the label your application expects.
Classification examples →Local neural functions
Describe a classification, routing, or triage task. ProgramAsWeights compiles it into a reusable neural program that runs on your CPU.
pip install programasweightsimport programasweights as paw
# Compile English into a local function.
fn = paw.compile_and_load(
"Classify if a message needs immediate attention or can wait"
)
# Runs locally — no internet, no API call from here on.
fn("Thesis defense moved to 3pm, need your signature today")
# Returns "immediate"Compilation uses the hosted PAW compiler. After the program and interpreter download, function calls run locally without an external API.
Describe the task and the output you need. Compile the function, test it on your examples, then call it from your application.
Assign messages to categories you define, such as billing, access, or cancellation. Return the label your application expects.
Classification examples →Map a request to a tool or website section. Ordinary code reads the result and chooses the next action.
Try the website helper →Decide which messages need immediate attention or which log entries need investigation. Reuse the same function for each new input.
Log-monitoring example →A larger compiler turns your specification into a neural program. A small, shared interpreter loads that program and executes each function call. Save the program and load it again on later runs. Compile outside the request handler and reuse the loaded function.
You can start without a training dataset. The Standard compiler generates a program from your specification; the Finetune compiler generates examples and trains the program further. Bring your own examples to evaluate either one.
The standard Qwen3-0.6B interpreter runs on a CPU; the SDK also supports GPU acceleration. Test with messages and edge cases from your application, and keep a separate test set when refining the specification.
PAW calls this fuzzy-function programming. The same interface supports extraction, JSON repair, search, and rewriting. Functions take text and return text, and ordinary code composes them. Try English to filters, PII extraction, or the other demos.
System 1 models, also written System One models, focus on fast decisions inside software. TypeSafe’s Jev returns typed answers with probabilities and confidence information. PAW returns text, including labels and JSON, and its current API does not expose calibrated confidence scores. See the Jev comparison.
In an agent, a compiled PAW function can route a request, classify a message, or select a tool. Ordinary code handles the selected action. Requests that need more involved reasoning can go to a separate reasoning model. The compiled function is reused each time the agent reaches that decision.
Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, Yuntian Deng
First arXiv submission:
Introduces fuzzy-function programming, a compiler–interpreter interface, and neural programs that combine text with learned parameters.
Yuntian Deng, Pengyu Nie, Stuart Shieber
First arXiv submission:
Extends PAW with teacher-generated examples and training at compile time. The resulting program uses the same interface and runs locally without the teachers.
Explore hypernetworks, generated adapters, and neural compilation in the reading list.