llama.cpp b11785:MoE 下投影按专家 token 缩放并支持张量并行
原标题:b11785
AI 摘要
llama.cpp 发布 b11785 版本,核心改动是将 MoE 下投影的全局 amax 重缩放替换为按专家 token 计算的缩放因子(沿中间维度做 POOL_1D 最大值归约),并用相同的 2 的幂因子在输出端还原。同时在 Meta 分片状态逻辑中处理 POOL_1D,使沿 axis 0 的分片变为各设备复制的部分结果,从而支持张量并行。该改动由 Georgi Gerganov 等人协作完成,并随版本提供 macOS、Linux、Windows、Android 等多平台预编译包。
正文节选
<details open> llama : scale moe down projection per expert token (#30861) * llama : scale moe down projection per expert token Replace the global amax rescaling for the MoE down projection with a per-expert-token factor computed by a POOL_1D max reduction along the intermediate dimension. Undo the scale on the output with the same exact power-of-two factor. Handle POOL_1D in the Meta split-state logic so a split along axis 0 becomes a replicated per-device partial result, enabling tensor par