Paper 1 of 5
Weight Placement Is Not Enough: Synchronization in Multi-Node CPU Decoding of Ternary LLMs
Problem
Existing multi-node CPU runtimes for ternary LLMs placed weights on the node of the reading thread but still suffered large synchronization stalls, with threads spending 20 to 48% of each token waiting at barriers.
Approach
The authors built a decode engine that reuses ik_llama.cpp kernels with node‑local weight placement and implemented two dataflows: a row‑owned split and a Megatron‑style column‑split. The column‑split assigns each NUMA node a quarter of the attention heads and FFN intermediate dimension, uses node‑level barriers for most work, and performs only two global reductions per layer. By reducing the frequency and scope of cross‑node synchronization, the column‑split cuts the time threads wait for each other and for node leaders. The engine pins one thread per physical core, binds weights, KV cache and buffers to their node with mbind, and measures throughput with 128‑token generation runs. Comparisons are made against the original ik_llama.cpp runtime and a patched version ik‑P with four optional switches.
Result
Across all configurations the column‑split engine was 1.5 to 2.1× faster than ik_llama.cpp using all cores and 1.5 to 1.9× faster than ik_llama.cpp at its fastest thread count; for the small model that fits in L3 cache the gains were 3.2× and 2.8× respectively, while maintaining the same accuracy and using less energy per token.
Why it matters
CPU inference engineers targeting low‑latency single‑user decoding of ternary LLMs on multi‑node servers should adopt the column‑split dataflow to reduce synchronization overhead and improve throughput.
Method details
- Llama3‑8B‑1.58‑100B‑tokens (IQ2_BN) reads 2.19 GB per token
- Falcon3‑10B‑Instruct‑1.58bit (IQ2_BN) reads 2.73 GB per token
- Falcon3‑1B‑Instruct‑1.58bit (IQ2_BN) reads 0.51 GB per token
- Platforms: dual‑socket Ice Lake (90.3/178.2 GB/s node/socket) and Emerald Rapids (157.5/320 GB/s node/socket) with four NUMA nodes
- Baseline: ik_llama.cpp at commit 0821d62 with one thread per physical core
- Ablations: Row‑owned vs Column‑split dataflows, barrier count isolation, and format study with Q2_K, Q4_0, Q4_K_M
Numbers
- speedup 1.5 to 2.1× vs ik_llama.cpp (all cores)
- speedup 1.5 to 1.9× vs ik_llama.cpp (fastest thread count)
- speedup 3.2× vs ik_llama.cpp (small model L3 cache, all cores)
- speedup 2.8× vs ik_llama.cpp (small model L3 cache, fastest thread count)
- synchronization wait 20 to 48% of each token
- barrier latency up to 12% of token for smallest model
Limitations
The engine only decodes a single sequence without prefill or batching, requires head, KV‑head and FFN counts divisible by the number of nodes, and was not evaluated on AMD CPUs, more than four NUMA nodes, or systems with SNC disabled.
On identical kernels, a Megatron-style column split beats a row-owned split without cross-node reductions in every configuration we measuredFound in the source text, word for word.
Picked because: Shows how to achieve high‑throughput, multi‑node decoding of ternary LLMs by addressing memory‑bandwidth limits, with released code for weight placement and synchronization.