← All research notes
NOTE 04 · SYSTEMS & OPTIMIZATION 6 min read

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.

ABSTRACT

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.

484.2×
MicroCore Speedup
4×–16×
State VRAM Cut
+38.9%
4-Bit Accuracy Gain
2.44×
Triton Kernel vs SDPA
01 CORE COMPILER Early-Exit & MicroCore 0.293 ms CPU MicroCore / req Mahalanobis OOD gate 79.3% safe offload 1.000 AUC two-site A 02 STATE KERNEL Balanced Truncation 1,848 tok/s 3.17x batch throughput 3584 MB -> 224 MB 40x lower PPL vs PCA Fused Triton 3.6.0 03 CORE PRUNING Anti-Inflation Decay 93.81% 4-bit acc (vs 54.88%) 1.18x-1.61x fewer params 31.40 PPL @ 0.75 keep Beats magnitude & var 04 SPECULATIVE Cross-Family Bridge 0.747 CCA SmolLM2 -> Qwen3 2.5M CoreDraftHead 1.26x exact lossless Trained in 9.6s
Figure 1. Summary of all four Algorithmic Core Extraction modules benchmarked on RTX 5090.

2. Summary of measured workstation benchmarks

ModuleMechanismMeasured RTX 5090 Result
ace_inference.compilerMid-layer early exit, two-site operator A & Mahalanobis OOD MicroCore484.2× vs. 16-tok gen (0.293 ms/req); 159.1× hybrid offloader; 1.0000 AUC on unseen IOI
ace_inference.kv_cacheBalanced-truncation H J^T SVD + fused Triton Pre-RoPE FlashDecoding4×–16× memory cut (3584 MB → 224 MB); 3.17× max-batch throughput; 40× lower PPL than PCA
ace_inference.pruningSufficient-core structured MLP pruning & anti-inflation decay scheduler1.18×–1.61× fewer params (1.28× decode); INT4 accuracy 54.88% → 93.81%
ace_inference.speculativeCross-family core alignment bridge + 2.5M CoreDraftHead0.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.

Inspect the code and benchmarks

Clone ace-inference on GitHub or explore how our optimization work feeds into the live Space AI Network.