Verified Transformer Inference & Agent Context Compression: AxiomZero (C++20 Speculative Kernels, Top-K SAE & CDCL) & TokenDiet (Salience Knapsack)
Published November 17, 2026 · Codebases: axiom-zero & tokendiet
Production enterprise AI bottlenecks at two boundaries: inside the Transformer inference runtime (where sequential autoregressive passes, unsteered circuits, and unverified reasoning wastes latency and breaks invariants) and across multi-turn agent harnesses (where verbose test logs, full-file reads, and unpruned payloads bloat prompt tokens). Both layers demand deterministic systems engineering in C++20 and Python rather than ad-hoc prompting.
1. AxiomZero (v1.0.0, 98.0% Test Coverage): Verified Inference, Interpretability & Formal Proof
AxiomZero unifies lossless speculative decoding, mechanistic interpretability, and formal verification into one clean-room PyTorch and native C++20 runtime:
- Systems & Lossless Speculative Kernel: Pairs a from-scratch Pre-Norm
RoPE + Grouped-Query Attention (GQA) + SwiGLU + RMSNormDecoder Transformer and Copy-on-Write (CoW) Paged KV-Cache with a nativeC++20Leviathan-Kalman-Matias speculative verification kernel — achieving 4.00× fewer target passes while keeping distribution shift bounded (TV = 0.014). - Mechanistic Top-K Sparse Autoencoder (SAE) Circuit Steering: Trains an overcomplete Top-K SAE with exact Riemannian unit-norm decoder projection on Transformer residual streams (R² = 0.9855), enabling live causal activation steering (
h' = h + α·d_f*) that drives target circuit behavior from 0% to 99.9%. - 1-UIP CDCL Solver, Independent RUP Proof Checker & CEGIS: Combines a Conflict-Driven Clause Learning SAT solver with an independent Reverse Unit Propagation (RUP) proof-checking kernel, an exact
fractions.FractionQF_LRAsolver, and a liveqwen3.5:4bCounterexample-Guided Inductive Synthesis (CEGIS) repair loop lifting verified passes from 10% to 90%.
2. TokenDiet (v1.0.0, 97.72% Test Coverage): Deterministic Agent Context Compression
TokenDiet eliminates agent context bloat before inference while preserving 100% of error anchors and AST syntax validity across coding and enterprise workflows:
- Native C++20 Order-Preserving Salience Knapsack: Uses integer-halo dynamic programming to compress noisy pytest/tsc/Docker runner logs — cutting pytest log size by 78.61% (
996 → 213tokens) while retaining 100.0% (4/4) of mandatory error anchors. ast.parse-Verified Python AST Skeletonizer: Deterministically elides irrelevant helper function bodies to save 36.19% tokens (431 → 275tokens) while guaranteeingast.parse=Truesyntax correctness.- Cross-Turn Block Deduplication & FinOps Cascade Router: Replaces repeated multi-turn reads with compact
[@tokendiet:ref]back-pointers (54.26% multi-turn savings) and routes easy single-unit bugfixes to local flash tiers while escalating formal proofs to frontier reasoning. - Live End-to-End
qwen3.5:4bAudit: Across 6 real coding-agent tasks, TokenDiet preserved 100.0% (6/6) verified accuracy while reducing prompt tokens by 70.25% (6,487 → 1,930tokens) and accelerating end-to-end latency by 53.98%.
Explore the Open-Source Suite & Connect
Browse all 46 public open-source repositories at projects.html, review Forward Deployed & Frontier Systems Architecture, or contact Nagarjuna Reddy Kamireddy directly at gmailtonagarjuna@gmail.com / writetonagarjuna@gmail.com.