Algorithmic Core Extraction: Four Inference Speedups on a Single Workstation
Transformers trained with standard weight decay do not use all of their width and depth equally: they converge onto compact, invariant algorithmic cores. Our open-source ace-inference suite turns that geometry into four concrete inference accelerations.
Building on Algorithmic Core Extraction (ACE; Schiffman, 2026), we implement and benchmark four modular inference optimizations on a single workstation GPU (RTX 5090, Qwen/Qwen3-1.7B): (1) mid-layer early exit and Mahalanobis-gated CPU MicroCore routing (up to 484.2× vs. 16-token generation), (2) Jacobian balanced-truncation projection of per-layer attention states with fused Triton Pre-RoPE FlashDecoding (4×–16× memory reduction, 3.17× peak batch throughput), (3) sufficient-core structured MLP pruning paired with an anti-inflation weight-decay scheduler (+38.9% 4-bit accuracy recovery), and (4) cross-family core alignment (0.7470 mean CCA) enabling 100% exact lossless speculative decoding.
1. Why model optimization is a scientific problem, not just hardware spend
Most LLM deployments treat a transformer as a monolithic black box: every request traverses every layer, every attention head holds full-width state across thousands of tokens, and every parameter stays frozen at its training shape.
In spaceresearchai/ace-inference, we exploit the low-dimensional manifold geometry hidden inside trained weights. By measuring exact input-output sensitivities via streaming Jacobian SVD, we separate the compact algorithmic core doing real computation from redundant capacity inflated during training.
2. Summary of measured workstation benchmarks
| Module | Mechanism | Measured RTX 5090 Result |
|---|---|---|
ace_inference.compiler | Mid-layer early exit, two-site operator A & Mahalanobis OOD MicroCore | 484.2× vs. 16-tok gen (0.293 ms/req); 159.1× hybrid offloader; 1.0000 AUC on unseen IOI |
ace_inference.kv_cache | Balanced-truncation H J^T SVD + fused Triton Pre-RoPE FlashDecoding | 4×–16× memory cut (3584 MB → 224 MB); 3.17× max-batch throughput; 40× lower PPL than PCA |
ace_inference.pruning | Sufficient-core structured MLP pruning & anti-inflation decay scheduler | 1.18×–1.61× fewer params (1.28× decode); INT4 accuracy 54.88% → 93.81% |
ace_inference.speculative | Cross-family core alignment bridge + 2.5M CoreDraftHead | 0.7470 mean CCA (R² = 0.7872); 1.26× exact FP32 lossless speedup in 9.6s training |
3. Custom Triton GPU kernels for real deployment
Theoretical speedups mean little if projection math becomes memory-bound on real GPUs. Alongside the Python algebraic suite, we wrote fused Triton 3.6.0 kernels tailored for modern NVIDIA architectures:
- Fused Pre-RoPE FlashDecoding: Executes attention directly in the low-rank balanced-truncation basis without ever expanding full-width key/value tensors back into GPU memory — delivering 2.44× speedup over standard PyTorch SDPA.
- Fused Core-Probe & 12-Layer Operator-A Synthesis: Computes mid-layer routing decisions and synthesizes downstream attention states in 22.7 microseconds, making dynamic early-exit practical even for single-request interactive streaming.
4. Open reproducibility
The full suite, algebraic equivalence unit tests, Triton kernels, and reproducible benchmark scripts are open on GitHub at github.com/spaceresearchai/ace-inference.
Clone ace-inference on GitHub or explore how our optimization work feeds into the live Space AI Network.