AISpot
所屬事件:llama.cpp 按專家 token 縮放 MoE 下投影,MoE 架構停用 tensor 拆分(1 個來源 · 3 則報導)

10 月 21 日至 24 日,llama.cpp 連續三個建置(b11785、b11858、b11866)圍繞 MoE 下投影的 amax 縮放做了一組改動。b11785 把 MoE 下投影的全域性 amax 縮放改為按專家 token 計算的因子,沿中間維做 POOL_1D 最大值歸約得到縮放量,輸出端再用同一 2… 看完整事件

llama.cpp Metal 後端移除 MoE mul_mm_id 的 amax 重縮放

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

llama.cpp 建置 b11866 在 Metal 後端移除了 kernel_mul_mm_id 中對 src1 的二次冪重縮放。這項縮放已經被計算圖中按 expert-token 執行的 amax 縮放(#30861)取代,後者能在運算元執行之前把 MoE 下投影啟用維持在 f16 範圍內。

原標題:b11866
閱讀原文

同一事件共有 3 則報導(1 個來源),看事件全貌

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

原文

metal : remove mul_mm_id amax rescaling ( #30924 ) The src1 power-of-two rescale in kernel_mul_mm_id is superseded by the per expert-token amax scaling done in the compute graph (ref: #30861 ), which keeps the MoE down-projection activations within f16 range before the op runs. Drop the two-stage reduction kernels, their scratch buffer and the GGML_PREC_F32 dispatch added in #26223 , as well as the test cases that drive MUL_MAT_ID src1 out of f16 range. 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/59468925 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 releases● 精選AI 評分62

llama.cpp Metal 把 few-row MMA 核心擴充套件到 BF16、MXFP4 等型別

llama.cpp 的 Metal 後端將通用 few-row MMA 矩陣乘法核心擴充套件到更多權重量化型別,BF16、Q1_0、Q2_0、MXFP4、Q2_K、Q3_K、TQ2_0 及 IQ 系列現已納入。該核心適用於任何帶 16-weight 反量化器的型別,各型別從在 M3 Ultra 上能勝過現有核心的行數起啟用:TQ2_0 為 5 行,BF16 為 4 行,MXFP4、Q2_0、Q2_K、IQ4_NL 為 3 行,其餘為 2 行。

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 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 評分52

llama.cpp 修復 Metal 後端 mul_mat_id 重複 id 錯誤

llama.cpp 建置版本 b11569 修復了 Metal 後端 mul_mat_id 在 id 重複時輸出錯誤、丟行乃至溢位到下一個 expert 切片的問題。新實現先做一遍預掃描,為每個 expert 建立緊湊的 (token, slot) 條目列表,並借鑑 Vulkan 方案讓 map0 額外輸出 tile 描述符,kernel_mul_mm_id 按描述符處理單個 tile,重複 id 由此被隱式處理。

llama.cpp releases● 精選AI 評分74

llama.cpp 修復 Metal 後端 MUL_MAT+ADD 融合錯誤

llama.cpp 合併 PR #30100,修復 Metal 後端 MUL_MAT+ADD 融合中殘差運算元的選擇錯誤:當 ADD 的兩個運算元都是矩陣乘法輸出(x = W1@u + W2@v)時,舊邏輯會選中自身從未寫入的輸出緩衝區,導致結果錯誤。Clef 決策模型因此在 Metal 上機率趨近均勻,billing 輸出 0.28,而 CPU 後端為 0.977,且同一檔案在 CPU 上結果正確,說明並非量化問題。