AISpot

llama.cpp 測試修復:MoE 路由選擇不再受後端噪聲干擾

llama.cpp releases版本更新地端推論開源

llama.cpp 建置 b11752 的兩項改動都集中在測試程式碼:MoE 路由選擇加入 step 2 的偏置斜坡,讓每個專家擁有獨立的分數區間,使 top-k 只由專家索引決定,避免後端浮點噪聲把 token 路由到不同專家。此前只有 Beam 架構(8 個專家用 2 個、4 組用 2 個)會撞上這個問題,在 M2 Ultra 上 20 個種子有 2 個失敗、logits 相差 4e-3;修復後 160 個種子全部與 CPU 參考值吻合在 4e-7 以內。

原標題:b11752
閱讀原文

評分35 / 38(平均 36,門檻 60)
狀態未入選

原文

tests : make MoE router selection independent of the backend noise ( #30818 ) tests : make MoE router selection independent of the backend noise The router scores are in the range [0, 1), so a random draw can leave the last expert (or expert group) still selected and the first one dropped tied within the noise between the backends. They then route a token to different experts and the logits differ by 4e-3 instead of the usual 5e-7. Beam is the only arch here with a real top-k (8 experts, 2 used) and a group top-k (4 groups, 2 used), so it is the only one that hits this: 2 of 20 seeds failed on an M2 Ultra, the other MoE archs select 2 of 2 and cannot tie. Fill the selection bias with a ramp of step 2 to give every expert a score range of its own, which turns the top-k into a function of the expert index alone. The bias affects only the selection, the weights still come from the unbiased probs, so the MoE output keeps its magnitude. Beam now matches the CPU reference within 4e-7 for all of 160 seeds. Assisted-by: pi:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (MacBook, M5 Max, 128GB) tests : tell the CPU and the GPU of an Apple SoC apart in the device table Both devices report the same description ("Apple M2 Ultra" here), so the device column of the test table had two indistinguishable rows and a failing row did not say whether the Metal device or the host CPU produced it. Add the device name, which is also what -b takes, unless the description already is the name. Assisted-by: pi:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (MacBook, M5 Max, 128GB) Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/57707819 macOS/iOS: macOS Apple Silicon (arm64) macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED macOS Intel (x64) iOS XCFramework Linux: Ubuntu x64 (CPU) Ubuntu arm64 (CPU) Ubuntu s390x (CPU) Ubuntu x64 (Vulkan) Ubuntu arm64 (Vulkan) Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries Ubuntu x64 (CUDA 13) - CUDA 13.4 libraries Ubuntu arm64 (CUDA 13) - CUDA 13.4 libraries Ubuntu x64 (ROCm 10.0) Ubuntu x64 (OpenVINO) Ubuntu x64 (SYCL FP32) Ubuntu x64 (SYCL FP16) Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Android: Android arm64 (CPU) Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Windows: Windows x64 (CPU) Windows arm64 (CPU) Windows arm64 (OpenCL Adreno) Windows x64 (CUDA 12) - CUDA 12.4 DLLs Windows x64 (CUDA 13) - CUDA 13.4 DLLs Windows arm64 (CUDA 13) - CUDA 13.4 DLLs Windows x64 (Vulkan) Windows arm64 (Vulkan) Windows x64 (OpenVINO) Windows x64 (SYCL) Windows x64 (ROCm 10.0) openEuler: DISABLED openEuler x86 (310p) openEuler x86 (910b, ACL Graph) openEuler aarch64 (310p) openEuler aarch64 (910b, ACL Graph) UI: UI

相關報導

llama.cpp releasesAI 評分41

llama.cpp 修復 Metal 後端每 token 9 專家 MoE 核心缺失

llama.cpp 建置 b11755 修復了 Metal 後端缺少每 token 9 專家 MoE 核心變體的問題(#30610、#30699),涉及 Apple Silicon 上的 MoE 推理路徑。該版本照例發布全平台預編譯包,覆蓋 macOS/iOS、Linux(CUDA 12/13、ROCm 10.0、Vulkan、SYCL、OpenVINO)、Android、Windows 及 openEuler 昇騰等後端。

llama.cpp releases● 精選AI 評分85

llama.cpp v0.7.0 發布:MoE 專家快取最高帶來 2.2 倍解碼提速

llama.cpp 發布 v0.7.0,最核心的變化是新增主機記憶體 MoE 專家的 GPU 快取(--moe-cache-mib),專家改由裝置端 LRU 快取執行,專家解除安裝時解碼最高提速約 2.2 倍,且該快取可跨多張 GPU 共享。版本同時加入 LiliCorr 投機解碼與 GLM5-Next 的 MTP 投機解碼,並支援 K2 Horizon、Prism Bonsai 2 27B、EmbeddingGemma-2、MiniCPM-V 4.7 等一批新模型。

llama.cpp releasesAI 評分43

llama.cpp 按專家 token 縮放 MoE 下投影,並支援張量並行

llama.cpp 建置 b11785 把 MoE 下投影的全域性 amax 縮放改為按專家 token 計算的因子:沿中間維做 POOL_1D 最大值歸約得到縮放量,輸出端再用同一 2 的冪因子還原。同時在 Meta 的 split-state 邏輯中加入 POOL_1D 處理,沿 axis 0 切分時變成各裝置複製的部分結果,從而支援張量並行。該提交還把 amax src1 縮放結果改為通過結構體返回,並清理註釋。