The card that was not supposed to run this
The NVIDIA GTX 1070 Ti shipped in 2017: Pascal, 8 GB of GDDR5, no Tensor Cores. In our machine it is not even in a proper x16 slot. It sits on a PCIe 3.0 x1 riser of the kind mining farms used, measured at about 0.9 GB/s.
The model we wanted on it: Ternary Bonsai 2.5, 27 billion parameters. The usual advice is "use llama.cpp with a small quant". We tried the alternatives first, and that is where the story starts.
Wall one: nothing modern wants Pascal
vLLM requires compute capability 7.0 or newer. Pascal is 6.1, so it refuses to build the path we needed. Stock llama.cpp runs the Bonsai weights, but the configurations that fit in 8 GB fall off a cliff as context grows: 12.43 tok/s at 4K, 2.04 at 64K, on the Q2_0 file. The PrismML fork runs the actual PTQ1_0 file faster, 15.19 at 4K, but 2.24 by the time you approach 128K.
So we wrote our own engine. C++ and CUDA, aimed squarely at SM 6.1: dp4a integer dot products for the ternary math, FP32 scaling around them, no tensor-core tricks because there are no tensor cores.
Wall two: the specs caught us being wrong, twice
Before any kernel was written, the requirements phase caught two assumptions that would have sunk the project:
- We assumed the model was a 52-layer dense transformer. The GGUF said otherwise: 64 layers in a hybrid architecture, Gated DeltaNet linear attention plus selective full attention. The whole kernel plan changed.
- We assumed the card was on a normal x16 slot, with roughly 12 GB/s of bandwidth to the host. Measuring showed x1, about 0.9 GB/s.
That second number killed an entire family of designs. Any plan that streams weights from CPU over that link is dead on arrival. Residency became the core idea instead: get all 64 layers onto the card and keep them there. The ternary format helps: 1.75 bits per weight puts the weights at 5.99 GB, and an iso3 3-bit quantized KV cache keeps a 102K-token context inside the card's 8 GB, peaking at about 6.5 GB during decode.
Wall three: drafting tokens is easy, keeping them correct is not
Multi-token prediction is our biggest speed lever: the engine drafts up to two tokens and verifies them before committing. The naive version is dangerous. Linear-attention states (DeltaNet) cannot be rewound by simply truncating a KV cache, and a rejected draft that leaves stale state corrupts everything after it.
The fix is a draft-verify-commit loop with rollback of the DeltaNet state. The proof it works is not a benchmark claim, it is a hash: at 102K context, 256 output tokens, bit-identical to the saved reference. At 4K with MTP on, the verifier compares over 1.8 billion floats per run and finds zero mismatches.
The payoff, measured: 30.35 tok/s at 4K without MTP, 55.79 with it, and 19.39 tok/s at 102K context after prefill.
The Rust detour, and what it actually gave us
Mid-project we tried rewriting the hottest CUDA kernels in Rust: the ternary GEMV, decode attention, and the DeltaNet state update. This is where Kiro's workflow agents earned their keep, because the work is grinding and verifiable: port a kernel, compare outputs bit-for-bit against the C++ original on real model data.
The first rustc build was 10 times slower, 274 ms per emulated token. The SASS dump showed why: the compiler left a 144-byte array in local memory, forty loads and stores per element, because it would not unroll our loops. Forcing the unroll removed the stack entirely.
The port ended up bit-identical on real weights, zero mismatches out of 2.4 billion compared floats. And here is the twist we did not expect: while matching Rust to C++, the agents found that our C++ prologue was doing runtime integer divisions per element, 85 XMAD instructions where 27 were enough. Making it division-free, then fusing it, gave +2.2% at 4K and +12.9% at 102K.
But the honest finding, written in the experiment log exactly this way: every speed-up found while porting came from a source-level change that C++ can express. None from the language. The Rust build ends up 0.0 to 0.3% off the tuned C++ build, so it stays in-tree as an opt-in, documented alternative, and the gains went into the C++ defaults.
The part Kiro played, including overnight
All of this ran through Kiro CLI. The parts that mattered most were not code generation:
Long-running, unattended work. A permission hook (.kiro/hooks/auto-allow-workflow.json) auto-approves routine tool calls and blocks anything irreversible: git push, reset --hard, sudo, PR merges. That hook is what made overnight sessions possible. On 30 November, a goal agent with max_iterations 50 ran the benchmark harness all night: 75 benchmark runs, 20 unit tests, 32 regression checks, no human in the loop, and it only kept changes that beat the baseline. That single night took 4K decode from 28.02 to 30.35 tok/s.
A pipeline for features. The terminal client went from spec to six merged PRs in two days: wf-planner reads the spec, wf-coder implements, wf-code-reviewer reviews, wf-pr-submitter opens the PR.
A save hook that checks the specs. Every save validates spec links and requirement numbering. It caught broken references dozens of times, usually minutes after I created them.
Steering that killed the cliches. Our first branding attempt looked like every AI hackathon project: dark gradient, purple glow, a ghost. A steering file now forces design work through our antialgorithm and brand-design skills. The brand that survived is the board itself: solder mask, silkscreen, 82 gold fingers, one PCIe lane lit in bare copper.
The honest cost
None of this makes the model smarter. The ternary weights trade quality for size: WikiText-2 perplexity 10.245 against 5.916 for the Qwen Q4_K_M reference, HellaSwag 71.0 versus 83.0 on small subsets. Those quality numbers were measured with llama.cpp, not by us, so the difference belongs to the weights, not to our engine. Speed never touched correctness: the fast path and the reference path produce identical tokens, verified at the bit level.
That is the trade we chose: a 27B model, all 64 layers, running locally on hardware the industry recycles, with the quality cost stated in the same sentence as the speed.
What we would tell the next team
Write the spec before the kernel. Two wrong assumptions, the layer count and the PCIe link, were caught on paper before they became two weeks of wrong code. Measure the boring things first: the slot your card sits in matters more than the FLOPs on the die. And when a rewrite turns out 10 times slower, read the SASS before you read the internet: the fix was forcing an unroll.
The engine, the experiment log (48 entries, E1-E48), the benchmarks, and every spec are public under Apache-2.0. Search "legacy1070qi38" on GitHub.







