AISpot

llama.cpp 修復 TOPK_MOE 測試的 CI 抖動

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

llama.cpp 建置 b12128 修復了 TOPK_MOE 測試的 CI 抖動。原因是均勻隨機 logits 下兩個 expert 的分數可能只差一個 f32 ulp,在輸出範圍較窄的 sqrt_softplus 門控下尤其常見,後端與 CPU 相差幾個 ulp 就會選中另一個 expert 導致測試失敗。修法是在 host 上用雙精度重取樣,直到組選擇與最終 top-k 都有 1e-4 相對餘量;

原標題:b12128
閱讀原文

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

原文

tests: fix CI flakes of TOPK_MOE caused by near ties ( #31426 ) tests: fix CI flakes of TOPK_MOE caused by near ties With uniform random logits, two experts sometimes land within one f32 ulp of each other at a routing boundary, mostly with sqrt_softplus gating whose output range is narrow. A backend whose gating differs by a few ulps from the CPU then picks the other expert and the test fails. Draw each row of logits again until the group selection and the final top-k both have a relative margin of 1e-4, computed on the host in double precision. tests: build the TOPK_MOE logits by inverting the gating function Draw the selection scores (probs plus bias) of each row as a random permutation of a grid, move the experts of the best groups up by half a step, and set the logits to the inverse of the gating function at these scores. Every expert and group decision is then one grid step apart on all backends, and the host no longer recomputes the routing. The softmax probs are built to sum to one so that the softmax keeps the scores, and the views of the logits are not initialized again after the logits are set. Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/64064666 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 26.04 s390x (CPU) Ubuntu 26.04 s390x (zDNN) 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 評分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 以內。

llama.cpp releasesAI 評分43

llama.cpp 為 CUDA 加入 384 專家的 Top-K MoE 融合

llama.cpp 發布 b11953 建置版本,CUDA 後端新增針對 384 個專家的 Top-K MoE 融合運算元(#31288),由 Codex 輔助完成,可加速此類稀疏 MoE 模型在 NVIDIA GPU 上的推理。該版本同步放出 macOS、Linux、Windows、Android 等多平台預編譯包,覆蓋 CUDA 12.8/13.4、ROCm 10.0、Vulkan、SYCL、OpenVINO 及驍龍 Adreno/Hexagon 等後端。

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 昇騰等後端。