Inspiration
Twenty-three years in a trade. Nine months in software. One engine.
I spent 23 years as an industrial painter and NACE Level 2 coating inspector in Alberta's industrial heartland — I painted the steel arches of Edmonton's Walterdale Bridge and inspected infrastructure where a bad call costs lives. What I saw for two decades: subjective visual disputes turning into multi-million-dollar lawsuits, and the independent contractors and First Nations crews on Treaty land who did the work having no capital and no tools to defend it against centralized authorities.
After seven years, the company I'd built on a handshake ended on one. In November 2025 I started teaching myself software. Grade 9 education, AuDHD, half Cree, half Welsh. I set out to build a Visual Appearance Reference Standard (VARS) so an inspection could be settled by evidence instead of by whoever had the lawyers. That pulled me into low-level systems programming, balanced ternary arithmetic, and Google Cloud Vertex AI — with Gemini as an uncompromising sparring partner the whole way.
The other thread is language. Roughly 80% of Indigenous communities in Canada and 35% of on-reserve households still lack reliable high-speed broadband. Community data is treated as an extractive commodity, and the languages are endangered. Cloud-only AI does nothing for them. For 23 years I helped people transform physical spaces. Now I build sovereign, zero-overhead software for the people who don't have an engineering department building for them.
What it does
Nistam Dream Engine is an edge-native, 1.58-bit balanced-ternary inference runtime for Gemma, a grammar-constrained Plains Cree tokenizer, and a Gemini 2.5 Flash governor on Vertex AI that audits the machine without ever seeing the language it protects.
- S13 ternary Gemma on consumer silicon. Three model directories — s13_gemma_2b_m3, s13_gemma_9b_m3, and s13_gemma_m2 — ~3.0 GB on disk, loaded together on a single NVIDIA RTX 3070.
- Mechanical refusal, not prompt filtering. A byte holds 256 states; 13 can never be a weight. Those 13 are out-of-band sentinels: a malformed byte has no state to decode into, and a malformed envelope is refused at a fixed slot in a 16-byte header before any heap allocation or parsing. Not a system that checks — one that can't do it wrong.
- ZPSR: Plains Cree tokenized by grammar. A Giellatekno/ALTLab finite-state transducer supplies the valid morpheme paths, GBNF masking clamps the decoder to legal continuations, and an ASP/Clingo layer enforces animacy, obviation and direction-hierarchy agreement. Measured against GPT-2 BPE on the GiellaLT lang-crk corpus; the whitepaper and its erratum are in the repo (DOI 10.5281/zenodo.22176968).
- Gemini 2.5 Flash as governor. When an edge sentinel trips, a watcher escalates a scrubbed inspection envelope to Gemini 2.5 Flash on Vertex AI — temperature 0.0, locked to a schema, against a context-cached regulatory corpus — writes the chain head to Firestore, and wipes its own staging. Nobody in the loop. Cree text, syllabics, verb stems and sacred markers never cross the wire: the three-wave filter in
forge-envelopestops them on the host, and its red/green test is in the repo. - Zero-retention vault (ADR-0026). Telemetry and inspection photos ride in ephemeral envelopes that zeroize on release. Proof goes to Firestore; the data doesn't.
- A shell built for an AuDHD brain. Tauri v2 — no Node, no Python server. A 119,625-star HYG astrolabe sky, a 120 Hz somatic tokenizer, a ConPTY glass terminal, and a cartridge-driven narrative engine, collapsed into one low-cognitive-load surface.
How I built it
One brick at a time, in Rust, with #![deny(unsafe_code)] and zero heap allocation on the hot path.
- WebGPU split-shaders with WGSL 64/32 dual-u32 register emulation, so the same kernel is bit-exact on CPU and across GPU architectures — no floating-point drift.
- S13 quantization: a base-243, five-trits-per-byte packer that takes multi-gigabyte Gemma matrices down to sizes that fit beside OS buffers on a commodity laptop, and a 243-entry trit LUT for the decode kernels.
- Two-tier routing: a 512-bit BQ MetaRouter (XOR + POPCNT Hamming distance against seven domain centroids) with TRIAD three-way consensus escalation when confidence is low.
- Vertex AI context caching and an autonomous loop: regulatory inspection corpora in a persistent CachedContent cache; a Python/Rust watcher (
agent_loop.py+forge-daemon-door) triages inputs with Merkle-root validation, escalates to Gemini 2.5 Flash, and records receipts to Firestore without a human in the loop. - Measured, not claimed. Every number in this project was true on my machine one day, at one temperature. In a pitch it stops being a measurement and becomes a claim — so this write-up has no figures. It has commands:
python scripts/run_competition_tests_3min.py # 3-minute suite, zero mocks
python scripts/vertex_flash_cache.py --prompt "Audit surface envelope hash #01 for degradation"
.\scripts\demo_cloud_agent.ps1 # envelope -> Gemini 2.5 Flash -> Firestore -> scrub
What my machine printed is in docs/RECEIPT-RUN-*.txt and the README. The only number you have to trust is the one yours prints.
Challenges I ran into
Validation, isolation, and unlearning the fear of failing in private.
Coming from the trades into high-consequence systems programming with no mentors was a solitary road. Early specs I posted got dismissed as "AI slop" after 80-hour weeks. Nobody in my daily life knew what a Fredholm resolvent or a balanced-ternary lattice was.
The technical failures were mine to own. When LLVM optimized my benchmark loops out of existence, I audited the code, added black-box barriers, threw out the inflated numbers and re-measured every cycle. When the whitepaper's v1 "purity" result turned out to be constants in a script rather than measurements, I withdrew them in a published erratum — and when the real measurement reversed my hypothesis, I printed that too. The metric stood; the story I'd told about it didn't.
Accomplishments that I'm proud of
- Gemma quantizes cleanly into .s13m, and three models load into ~3.0 GB on a single consumer GPU. The 9B decodes end to end on CPU, and the GPU kernels match it bit for bit.
- The ZPSR token-count result held on real Plains Cree text — and the result that didn't hold is published with its withdrawal. Both are in the DOI.
- A test harness with zero mocks: no simulated latency, no fake math.
cargo test --workspaceprints the count. - Open mathematics with academic priority: the whitepaper (10.5281/zenodo.22176968) and the earlier foundations (10.5281/zenodo.22020676) — a sovereign blueprint for edge AI and First Nations data governance.
What I learned
Human attention is the ultimate execution hot path.
If software overwhelms a neurodivergent mind, or demands gigabit fibre where none exists, the elegance of the backend is irrelevant. Treat attention with the same zero-allocation respect as L1 cache: push verification into deterministic edge structures, pre-compute the state boundaries, and give the human back their bandwidth for craft, for flow, and for sovereign decisions.
What's next for Nistam Dream Engine
Not too sure, today's the first day of the rest of my life.

Log in or sign up for Devpost to join the conversation.