AISpot

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

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

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

原標題:b11785
閱讀原文

評分44 / 42(平均 43,門檻 60)
狀態未入選

原文

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 parallelism. Assisted-by: pi:llama.cpp/ggml-org/DeepSeek-V4-Flash-Vision-Exp-GGUF (Mac Studio, M2 Ultra, 192GB) cont : simplify comments Co-authored-by: Georgi Gerganov [email protected] llama : refactor amax src1 scaling result Return the rescaled activation and the optional scale tensor through a small struct instead of an output pointer. Assisted-by: pi:llama.cpp/ggml-org/DeepSeek-V4-Flash-Vision-Exp-GGUF (Mac Studio, M2 Ultra, 192GB) cont : add TODO + clean-up Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/58090560 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 releasesAI 評分46

llama.cpp 新版最佳化 Vulkan 上 MoE 重複專家的矩陣乘

llama.cpp 發布 b11554,Vulkan 後端改進了 MoE 推理中 mul_mat_id 對重複專家 id 的處理:不再逐個迴圈,而是在預計算階段統一處理。原本受限的 hoist row ids 最佳化現在預設開啟,會生成緊湊的 tile 描述列表、按需發射多個 tile,從而收緊 workgroup 數量上界,尾部執行緒可直接提前退出。

llama.cpp releases● 精選AI 評分69

llama.cpp b11507 支援 MoE 快取跨多 GPU

llama.cpp 發布 b11507 版本,新增 MoE 快取跨多張 GPU 的支援(PR #30112),可讓混合專家模型在多 GPU 環境下更充分地利用視訊記憶體。該版本同時更新了各平台預編譯產物,覆蓋 macOS Apple Silicon、iOS、Linux(CUDA 12/13、Vulkan、ROCm 10.0、SYCL、OpenVINO)、Windows、Android 以及 openEuler 等平台。

llama.cpp releasesAI 評分36

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

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 以內。