llama.cpp Adds Cost-Based Tensor Split for 3-4% Speedup on Hybrid Multi-GPUs
milpster · reddit · 2026-08-11
A developer introduced a new cost-based tensor split mode (-sm cost) to llama.cpp, delivering significant inference speedups on specific multi-GPU configurations.
- Core Improvement: The default layer split treats all layers equally, but in hybrid models (e.g., Qwen3.6 with Mamba + Attention layers), attention layers are computationally much more expensive. The new mode weights attention layers at 4.0 and Mamba layers at 1.0 for smarter load balancing.
- Performance Gain: In mixed-speed multi-GPU setups (e.g., AMD + NVIDIA), this reduces the workload on the slowest GPU by 1-2 layers. Combined with pipeline parallelism, it yields a consistent 3-4% Token Generation (TG) speedup.
- Topology Advice: The author highlights the bottleneck of cross-vendor GPU transfers bouncing through system RAM. A "fast-slow-fast" device ordering is recommended, placing the slow GPU in the middle to overlap cross-vendor transfer latency with computation.
- Use Case: This optimization specifically benefits hybrid models (Mamba/SSM + Attention) running on mixed-speed GPUs with pipeline parallelism enabled.
More from Infra
- Applied Compute Targets $3 Billion Valuation Amid Open-Source Demand — pstAsiatech · 2026-08-11
- Under 10% of Enterprises Scale AI; Compute Shortage to Persist — BenBajarin · 2026-08-11
- Amazon Backs Texas Gas Plant That May Become Top US Climate Polluter for AI — Ars Technica AI · 2026-08-11
- HKU Team Bypasses Von Neumann Bottleneck with Ultra-low Power 2D Material AI Chip — YiMaTweets · 2026-08-11
- Blockstream launches atomic swaps for Bitcoin and Lightning, citing AI-assisted attacks — RSync25 · 2026-08-11
- Local AI Video on RTX 3060 Ti: Generate High-Quality Clips in 20 Minutes with 8GB VRAM — cocktailpeanut · 2026-08-11