r/LocalLLaMA · · 1 min read

ProgramAsWeights: describe an AI function in English, compile it once, and run it locally on CPU

Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.

ProgramAsWeights: describe an AI function in English, compile it once, and run it locally on CPU

With the recent interest in Jev, especially in open-source and locally executable alternatives, I wanted to share a related project we've been building at the University of Waterloo: ProgramAsWeights (PAW).

The idea is simple: describe a function in English, compile it once, then call it from Python. The resulting function runs on your own CPU, without sending each input to an API.

For example:

https://preview.redd.it/xlsfp5rl6cqh1.png?width=1800&format=png&auto=webp&s=fb05ea259fdbf53c965a8373a3c1fc9688347cab

import programasweights as paw fn = paw.compile_and_load("Classify urgent emails") fn("Need this today") # "urgent" (runs locally) 

How it works

We trained a larger model to generate a LoRA adapter from an English function description. That adapter specializes a shared Qwen3 0.6B interpreter for the task. You can keep multiple compiled functions and reuse the same base model.

The SDK uses our hosted compiler by default. Once the compiled program and base model are downloaded, inference runs locally and works offline. The compiler weights are also public for people who want to run compilation themselves.

I've used this to build a course website helper with ~30 small neural programs connected by ordinary decision-tree code. One function decides which answerer should handle a question, and the surrounding code controls what happens next. Here's my course website helper in case you are curious: https://yuntiandeng.com/teaching/spring2026/cs486-introduction-to-artificial-intelligence/#ask

Some of you may remember an earlier version posted here (https://www.reddit.com/r/LocalLLaMA/comments/1sm9fmw/compile_english_function_descriptions_into_22mb/). At the time, people asked for the compiler itself to be released. Its weights are now public, along with the paper explaining how it works.

Python SDK: https://github.com/programasweights/programasweights-python
Compiler weights: https://huggingface.co/programasweights/paw-4b-qwen3-0.6b
Paper: https://arxiv.org/abs/2607.02512

You can try the browser playground before installing anything:

https://programasweights.com/playground

submitted by /u/yuntiandeng
[link] [comments]

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from r/LocalLLaMA