Optimize llama.cpp Dual-GPU Tensor Split for Larger Context

ea_man · reddit · 2026-08-31

The author shares a method to fine-tune VRAM allocation in llama.cpp across two GPUs using --override-tensor. Unlike rough ratios, this approach moves specific tensors to maximize space, increasing context length for a Qwen model from 110k to 139k tokens. A script tool is provided to automate the probing process on Linux (supporting ROCm/Vulkan), along with a workflow involving KV cache saving to validate the results.

Original post →

More from Infra

Infra channel →