llama.cpp b12136 修复 fit 未计入 NextN 层问题
原标题:b12136
AI 摘要
llama.cpp 发布 b12136 版本,修复了 fit 功能在设置 n_gpu_layers 时未计入被跳过的 NextN 层的问题。此前在无 MTP 情况下,fit 统计 n_layer+1 层而加载器统计 n_layer_all+1 层,导致全量卸载后仍有层(如 Qwen3.8-27B 双 GPU 上显示 65/66 层)留在 CPU。该修复将跳过的 NextN 层计入 n_gpu_layers 及输出层所在设备的张量切分,使加载器按 fit 的测量结果分配层,并修复了 #31531。
正文节选
<details open> fit : account for skipped NextN layers when setting n_gpu_layers (#31569) * fit : account for skipped NextN layers when setting n_gpu_layers Without MTP, fit counts n_layer + 1 layers while the model loader counts n_layer_all + 1 for n_gpu_layers, including the NextN layers which hold no weights. A fit result that offloads all layers then leaves layer 0 on the CPU ("offloaded 65/66 layers" for Qwen3.8-27B on two GPUs). Add the skipped NextN layers to n_gpu_layers and to the te