Show HN: Psudo – 47MB 2-bit coding model, Polish-prefix IR, and Rust transpiler A developer released Psudo, an open-source coding stack built around a 47.0 MB, 100.7M-parameter 2-bit ternary (TQ2_0) model that runs local code synthesis within a 4 GB VRAM budget on an NVIDIA GTX 1660 Ti. The project pairs a token-compressed .psudo DSL with a Polish-prefix intermediate representation (pIR) that cuts token counts 45–60% versus surface syntax, and a pushdown-automaton mask (PirPdaConstraint) over the 8,192-token BPE vocabulary that the author reports yields a 0% syntax error rate at decode time. Verified .psudo code lowers through a borrow checker and sandbox into safe Rust with zero unwrap calls, and both quantized .gguf checkpoints (47.0 MB and 23.2 MB) ship in the repo, built with plain cargo and no CUDA or C++ toolchains, trained on roughly 7,800 borrow-checked trajectories. 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. php 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 " | 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 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? 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. - 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