CPU-Only Inference: A Slower, Memory-Bound Fallback
Pure CPU inference, even with modern instruction sets like AVX-512 or ARM NEON, typically yields 10-15 tokens/second for quantized Llama 3 8B Q4 models, making it a viable but significantly slower last-resort option due to memory bandwidth limitations.
The top 3
- Top CPU Instruction Sets Boosting LLM Inference: Modern CPUs significantly accelerate LLM inference by leveraging specialized instruction sets such as Intel's AVX-512, VNNI, and AMX, as well as ARM's NEON/SVE for efficient matrix operations.
- Memory Bandwidth: The #1 CPU LLM Bottleneck: Memory bandwidth is the primary limiting factor for CPU-only LLM inference speed, with high-speed DDR5 RAM (e.g., 6000 MT/s or faster) in dual-channel configurations providing a direct and significant boost to token generation rates.
- Critical Cache Levels: CPU Hierarchy's LLM Inference Impact: For CPU-only LLM inference, the L3 cache plays a pivotal role in performance. Larger L3 caches reduce expensive main memory accesses by keeping more frequently accessed model weights and activations on-chip, significantly lowering latency, especially for smaller models or quantized versions.
Sources
Open the full topic