Papers & Technical Reports

Deep-dives, hardware benchmarks, and reproducible engineering notes from the ANEMLL open-source project — covering Apple Neural Engine quantization, hybrid ANE + GPU execution, speculative decoding, and multi-Mac Thunderbolt RDMA.

Showing 6 of 6 papers
Latest
M6 Quantization ANE Bonsai 2.5

Ternary-to-VQ: Running Bonsai 2.5 27B on the Apple Neural Engine (M6)

Repacks PrismML's group-scaled ternary Bonsai 2.5 27B checkpoint into a shared 16-entry paired-codebook vector quantization format with per-output scales so projections execute natively on the Apple Neural Engine. Refined via activation-weighted LoftQ and QAT, the 401 packed matrices occupy 6.37 GiB and reach 203.4 tok/s cold prefill and 30.2 tok/s decode at 64K context on a single 32 GB M6 Mac mini (44–47 tok/s code, 45–65 tok/s JSON at 8K).

6.37 GiB packed weights 203.4 tok/s prefill (64K) 30.2 tok/s decode (64K)
M6 Multi-Mac RDMA ANE + GPU Qwen3.8-27B

Two-Mac TP2 Inference on M6: Architecture, Optimizations and Results vs the Single-Node GPU+ANE Hybrid

Splits Qwen3.8-27B (Forge C1) with 2-way tensor parallelism across two Apple M6 Mac minis over a single Thunderbolt 4 RDMA cable (~20 μs per 80 KiB exchange) while pipelining GPU attention and ANE feed-forward layers inside each node. Compared to a single Mac, two Macs achieve 2.0–2.3× faster prefill (807–1,166 tok/s) and 1.8–2.2× faster decode (77–82 tok/s, peaking at 117.6 tok/s on HumanEval 1) while using 13–16 GiB per Mac at 96K context.

2.0–2.3× prefill speedup 77–82 tok/s decode (117.6 peak) ~20 μs TB4 RDMA sync
M6 Speculative Decoding ANE + GPU Qwen3.8-27B

Tree Speculative Decoding on a Split ANE + GPU Target: Qwen3.8-27B on Apple M6

Constructs a dynamic 7-node speculative verification tree from a DFlash2 block drafter inside a fixed 8-row ANE+GPU verify budget for Qwen3.8-27B (48 Gated DeltaNet + 16 full-attention layers), introducing a DeltaNet short-convolution fix (corrx0) and child-by-child sampled rejection. Delivers +8.5% to +10.2% pooled client tok/s over chain8 on sampled benchmarks and +1.9% to +6.5% on greedy 2K–64K rungs, with 100% equivalence across 152 paired replies.

+8.5% to +10.2% sampled tok/s Fixed 8-row verify budget 152/152 paired reply match
M6 ANE + GPU Qwen3.8-27B

One model, two accelerators: faster prefill and decode on the M6 with the Neural Engine and the GPU together

Documents the evolution of Forge V8, V8.1, and V8.2 — executing a single 27B model concurrently across the Apple M6 GPU and Neural Engine over unified memory — and benchmarks V8.2 against Splash 1.7.0 from 2K to 96K context. Adds FP8 P·V with a 16 KB on-chip Q·K scratchpad for up to 12% faster long-context prefill and a GPU keep-alive that reduces median 66K split-decode cycle latency by 11% (150 ms to 133 ms).

+12% long-context prefill 11% lower 66K decode latency 2K–96K vs Splash 1.7.0
M6 Quantization ANE Qwen3.8-27B

Three-bit MLP vector quantization on the Apple Neural Engine

Adapts Qwen3.8-27B to the Apple Neural Engine in ANEMLL Forge 0.2 by quantizing every MLP matrix into 3-bit vector lookup tables of learned weight pairs with per-output-channel scales, fixed Hadamard rotations, GPTQ, and 600 steps of KL-divergence QAT. Drops KL-512 vs BF16 from 0.1838 to 0.0518 (91.9% top-1 agreement), compresses packed weights to 9.74 GiB, and averages 37.5 tok/s on M6 with DFlash2 and FP8 softmax intermediates.

9.74 GiB packed weights 0.0518 KL-512 vs BF16 37.5 tok/s avg on M6
ANE Foundations

“Anemll-style” Root-Mean-Square (RMS) Normalization on the Apple Neural Engine: A Simple Hack

Addresses the Apple Neural Engine's lack of a native RMSNorm hardware operator by concatenating each input tensor with its negation ([x, -x]) to guarantee zero mean, allowing the ANE's built-in hardware-accelerated LayerNorm to compute exact RMSNorm directly on-accelerator without falling back to CPU or GPU.

Native ANE LayerNorm trick Zero CPU/GPU fallback Exact RMSNorm math