2026-11-26 15:47 UTC

Psudo releases a tiny local coding-model and Rust toolchain

state: seedheat: lowuncertainty: mediumrelevance: mediumsmall-language-models local-inference coding-agentsSteve Sujo

What is this?

Psudo is an experimental open-source project by Steve Sujo, presented on GitHub and shared in a Show HN post dated November 20, 2026. It combines a small coding model with a compact Polish-prefix intermediate representation (pIR), a Python-indented DSL, and a Rust transpiler. The repository says its main checkpoint has 100.7 million parameters, ternary TQ2_0 weights, and a 47 MB file size; it is intended to synthesize small function bodies locally, with a stated 4 GB VRAM target. The author reports training on about 7,800 verified examples and says grammar masking prevents invalid pIR syntax, but explicitly warns this does not ensure logically correct code. These are project-repository claims; the supplied evidence contains no independent performance evaluation or adoption evidence.

Why it matters

Psudo explores a different way to make small local models useful for coding: restrict them to atomic functions, compress the representation they generate, and use grammar constraints plus a compiler pipeline to handle some reliability and deployment burdens. If effective, this pattern could make narrow coding-agent tasks more accessible on modest hardware and reduce reliance on cloud inference. The repository describes a prototype, not evidence that it is faster, more capable, or safer than alternatives; valid syntax is not the same as correct behavior.

Current assessment

New: Steve Sujo’s Psudo repository describes a local code-synthesis stack built around a 100.7M-parameter TQ2_0 model, pIR output, a constrained decoder, a DSL, and deterministic lowering to Rust. The repository lists 47 MB and 23.2 MB quantized checkpoints, a pure-Rust inference engine, and a 4 GB VRAM target; it says pIR uses 45–60% fewer tokens than surface syntax and PDA masking yields zero syntax errors at decode time. These figures and capabilities are author/project claims, not independently validated in the supplied sources. The author says the model is intended for small, single-purpose stubs rather than large programs, and warns that grammar masking guarantees syntax only, not semantic correctness. The project may be worth tracking as an experiment in specialized small-model coding agents and local inference, but the evidence does not establish benchmark performance, reliability in real applications, or broader uptake. The linked GitHub page was fetched November 19, 2026; the Show HN item is dated November 20, 2026.

Measured heat

now 0 pts/hpeak 6 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 170h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-19 13:27 (minted)⭐ origin echo-reconstructedThe repository README is the primary artifact: “A token-compressed DSL (`.psudo`), a Polish-prefix intermediate representation (`pIR`), a bo
Steve Sujo (GitHub user steveSujo) on github (echo) · attributed from hn.story.50559718 · published time unknown
—
11-19 13:17first on hacker news · published · lag ?Show HN: Psudo – 47MB 2-bit coding model, Polish-prefix IR, and Rust transpiler
someProgramer
—
11-19 13:17amplified on hacker news 👑hn.story.50559718
someProgramer
peak 3 · 0 comments · 98% of case engagement
11-19 13:20our radar first saw it · lag ?discovery anchor: hn.story.50559718—
pace: p13 vs 2096 stories at the 168h mark (now 170h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Psudo – 47MB 2-bit coding model, Polish-prefix IR, and Rust transpiler
Retrieved article excerpt

Open article · Retrieved 2026-11-19T13:21:49.742737+00:00

# psudo

A token-compressed DSL (`.psudo`), a Polish-prefix intermediate representation (`pIR`), a borrow-checked safe Rust transpiler, and a pure-Rust 2-bit ternary (`TQ2_0`) inference engine—built to run local code synthesis inside a **4 GB VRAM** budget.

```
flowchart LR
    A[".psudo DSL"] --> B["pIR (Polish-prefix IR)"]
    B --> C["pseudo-engine (100M TQ2_0 + PDA Mask)"]
    C --> D["Borrow Checker & Sandbox"]
    D --> E["Safe Rust (0 unwrap)"]
```

 Loading

| Metric | Value |
| --- | --- |
| Primary Model Footprint | `47.0 MB` (`100.7M` params, `TQ2_0` 2-bit ternary weights) |
| Context Compression | `45–60%` fewer tokens than surface syntax via `pIR` |
| Syntax Error Rate | `0%` at decode time via Pushdown Automaton (`PirPdaConstraint`) masking |
| Runtime Dependencies | Zero (pure Rust, `memmap2`, no CUDA/C++ toolchains required) |
| Training Dataset | `~7,800` borrow-checked & sandbox-verified trajectories |

Both quantized `.gguf` checkpoints (`47.0 MB` and `23.2 MB`) ship right in this repo, and everything compiles with plain `cargo` (zero C++, Python, or CUDA dependencies):

```
git clone https://github.com/steveSujo/psudo.git
cd psudo
cargo build --release && ./target/release/psudo demo
```

---

## Why I built this

I wanted to run and train coding models on my own machine—not rent bigger GPUs or burn cloud token quotas on every loop and helper function.

My laptop has an **NVIDIA GTX 1660 Ti with 4 GB of VRAM** and limited RAM, so running frontier models locally is out of the question. Instead of seeing those limits as the problem, I treated them as **creative constraints**: how can I make the best out of this? Finding a creative solution is way more fun than throwing raw power at the problem or trying to vertically scale my PC.

Running a small, limited model with **2-bit precision (`TQ2_0`)** shrinks the VRAM footprint enough to live comfortably alongside an IDE and compiler—and exploring how far that tiny model can push raw coding power became the whole point:

1. **A tiny surface language (`.psudo`):** Python-indented, minimal punctuation, almost zero boilerplate tokens.
2. **Lowering to safe Rust (`pseudo-transpiler`):** A toy language has no ecosystem. To build real binaries, verified and borrow-checked `.psudo` lowers into safe Rust (`0` `.unwrap()` or `.expect()` calls) and compiles with `cargo`.
3. **The Cactus & Needle spark:** Seeing [Cactus](https://github.com/cactus-compute/cactus) and [Needle](https://huggingface.co/Cactus-Compute/needle3)—2-bit on-device models (`29M–121M` params in `8–29 MB`) beating much larger models on constrained tool calls—showed what tight constraints can do.
4. **"What if?":** *What if I trained a ~100M 2-bit ternary model (`TQ2_0`) whose only job is writing atomic `.psudo` function bodies locally, while I (or a frontier LLM) stay at the orchestrator level?*

---

## How it works (`pIR`, PDA Masking & 2-bit `TQ2_0`)

Asking a `100M` model to emit verbose surface syntax wastes half its context window on keywords and whitespace. Instead, the model emits **pIR (Pseudo Intermediate Representation)**—a Polish-prefix S-expression format where `fn` is `f`, `let` is `v`, `return` is `r`, `if` is `?`, and `while` is `w`:

```
// Surface .psudo (what humans read)
fn clamp_val(val, lo, hi)
    if val < lo
        return lo
    if val > hi
        return hi
    return val

// Wire pIR (what the 100M model emits)
f clamp_val (val lo hi) [
  ? (< val lo) [ r lo ]
  ? (> val hi) [ r hi ]
  r val
]
```

That trade buys two things:

- **45–60% fewer tokens** per function body.
- **0% syntax errors at decode time:** `pseudo-engine` runs a pushdown automaton (`PirPdaConstraint`) over the `8,192`-token BPE vocab and masks out invalid tokens *before* sampling.

### Models (Included in Repo)

- **`pseudo-100m-tq2_0.gguf` (`100.7M` params, `47.0 MB`) — Primary:**
  `d_model = 768`, `14` layers, `12` heads (`4` KV heads), `FFN = 2048`, `vocab = 8,192`, `max_seq_len = 512`, `TQ2_0` ternary weights (`{-1, 0, 1}`). Auto-discovered by `psudo synth` for ~15-line atomic stubs (guards, math, loops, JSON/KV helpers).
- **`pseudo-33m-tq2_0.gguf` (`33.6M` params, `23.2 MB`) — Embedded Fallback:**
  `d_model = 512`, `8` layers, `8` heads (`4` KV heads). Baked into the `psudo` binary for offline smoke tests if no external `.gguf` is present.

Both were distilled from [`Qwen/Qwen2.5-Coder-7B-Instruct-AWQ`](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-AWQ) plus a synthetic generator—every sample had to pass type checking, borrow checking, and sandbox execution in headless `psudo` before being compiled to canonical `pIR` (`~7,800` verified trajectories across `<pir>`, `<error>` 1-shot auto-heal, `<zettel>`, and `<clarify>`).

---

## Try the Examples

Requires Rust `1.75+`. Build both binaries (`psudo` and `pseudo-engine`):

```
cargo build --release
```

`examples/` ships three pre-built workspace capsules (`psudo.bin`) with mock sandbox data in `.pseudo/sandbox/`:

```
# 1. JSON Server Log Incident Filter
./target/release/psudo check examples/log-incident-filter/psudo.bin --all-modules
./target/release/psudo build examples/log-incident-filter/psudo.bin --run

# 2. IoT Temperature Sensor Alert Monitor
./target/release/psudo build examples/sensor-alert-monitor/psudo.bin --run

# 3. API Tiered Quota & Billing Calculator
./target/release/psudo build examples/quota-fee-calculator/psudo.bin --run
```

---

## Orchestrator Workflow

Your code lives inside a single signed capsule file (`psudo.bin`). You (or an outer coding agent) declare signatures, stubs, and tests; `psudo synth` fills in the bodies locally.

```
# 1. Initialize a workspace (templates: blank, log, sensor, quota)
psudo init my-app --template blank --with-docs && cd my-app

# 2. Declare an atomic @stub function (defaults to ./psudo.bin when omitted)
psudo vfs stub compute_fee units rate free_tier \
  --directive "if units <= free_tier return 0, else return (units - free_tier) * rate"

# 3. Synthesize with auto-discovered 100M GGUF (auto-starts persistent --daemon)
psudo synth --write

# 4. Inspect call-graph DAG and behavioral contract (without dumping raw code)
psudo dag --format mermaid
psudo contract

# 5. Add an in-capsule test and wire the entrypoint
psudo vfs test test_fee --call "compute_fee(15, 2, 10)" --expect "10"
psudo vfs wire --entry main_task --call "print(compute_fee(15, 2, 10))" --return "0"

# 6. Borrow-check, test, run directly, or compile to native Rust
psudo check -a
psudo test
psudo run --call "compute_fee(15, 2, 10)"
psudo build --run
```

### Why raw `.psudo` is hidden behind a key

When I tested outer LLM agents with this CLI, they kept peeking at the `.psudo` source and hand-writing functions instead of using `psudo synth`. So `psudo vfs show --all` and `psudo synth --print` stay locked unless you pass the key:

- **Question:** *"What jumped over the lazy dog?"*
- **Key:** `--reveal-code "the slow pink elephant"`

For agent harnesses, [`psudo-orchestrator`](https://github.com/steveSujo/psudo/blob/main/.agents/skills/psudo-orchestrator/SKILL.md) and `psudo mcp` (stdio JSON-RPC) are included. Run `psudo --help`, `psudo docs`, or `psudo -s` for the full reference.

---

## Rough Edges & Honest Expectations

**This is not a polished product.** It is an exploration of an idea with plenty of sharp corners:

1. **Keep stubs atomic:** A `100M` 2-bit model cannot write an HTTP server in one shot. Give it small, single-purpose functions (guards, clamping, arithmetic, simple loops, KV/JSON helpers).
2. **Grammar masking != semantic intelligence:** The PDA mask guarantees valid `pIR` brackets and ops, so an out-of-distribution prompt still produces valid syntax—just logically wrong fallback code.
3. **Strict 4-space indentation & `//` comments:** 2-space indents and tabs fail with `E002`; `#` comments fail with `E001`.
4. **Sealed `psudo.bin` feels weird at first:** Keeping source inside a masked binary capsule is deliberately awkward for manual editing—it exists to keep outer agents in the orchestrator seat.
5. **Bimodal CPU speeds:** `pseudo-engine --benchmark` swings between fast runs when `memmap2` pages are hot and slow runs on cold pages or OS background scheduling.
6. **Windows-first mileage:** Most testing happened on Windows 11. Rebuilding while `psudo.exe` is running hits Windows file locks, and Linux/macOS paths have less mileage.

Expect bugs! I'll keep tweaking the language and the tiny model as I experiment.

---

## Repository Layout

| Path | Description |
| --- | --- |
| [`pseudo-lang/`](https://github.com/steveSujo/psudo/blob/main/pseudo-lang) | `.psudo` lexer, parser, borrow checker, `psudo.bin` VFS capsule, contract generator, and `psudo` CLI |
| [`pseudo-engine/`](https://github.com/steveSujo/psudo/blob/main/pseudo-engine) | Pure-Rust zero-copy GGUF parser, `TQ2_0` ternary kernels, 2-tier INT8 KV cache, PDA sampler, and `--daemon` |
| [`pseudo-transpiler/`](https://github.com/steveSujo/psudo/blob/main/pseudo-transpiler) | Deterministic IR lowering between `.psudo` and safe, zero-`unwrap()` Rust |
| [`examples/`](https://github.com/steveSujo/psudo/blob/main/examples) | Pre-built capsules (`log-incident-filter`, `sensor-alert-monitor`, `quota-fee-calculator`) |
| [`templates/`](https://github.com/steveSujo/psudo/blob/main/templates) | Source `.psudo` templates and `.pseudo/sandbox/` fixtures for `psudo init` |
| [`.agents/skills/`](https://github.com/steveSujo/psudo/blob/main/.agents/skills) | `psudo-orchestrator` skill for LLM harnesses |
someProgramer30
🟧 echo.github ⭐The repository README is the primary artifact: “A token-compressed DSL (`.psudo`), a Polish-prefix intermediate representation (`pIR`), a boSteve Sujo (GitHub user steveSujo)——

Interpretation history

Decision trace