AISpot

llama.cpp 重構 SYCL 後端 XMX 多列矩陣乘,新增融合 gate/up 核心

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

llama.cpp 重構了 Intel XMX 矩陣引擎上的多列 mul_mat_vec_q,並新增融合 gate/up 核心:一次啟動即算出 up*act(gate),最多支援 16 列。多列路徑覆蓋 2 到 80 列啟用,面向投機解碼驗證(每步 2 到 8 個 token)與 9 到 80 token 的短 prompt 批次。

原標題:b11821
閱讀原文

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

原文

Multi-column on Intel XMX matrix engines refactored ( #29864 ) Multi-column on Intel XMX matrix engines refactored Multi-column (2 to 80 activation columns) mul_mat_vec_q for reordered K-quant and Q8_0 weights on the Intel XMX matrix engines (int8 DPAS, ESIMD), for the SYCL backend. It targets speculative decoding verification (2 to 8 tokens per step) and short prompt batches (9 to 80 tokens). Three types also use it for a single column (Q2_K, Q3_K, Q8_0). Fixed regression bug real bug found: the first version produced NaN whenever the row count wasn't a multiple of 4 Removed GGML_TYPE_Q8_0 activation rewritten xmx_mul_mat 64-byte alignment and 16-byte pitch check on the activations Implemented fused gate/up kernel One launch computes up * act(gate) for both FFN weights, reading the activations once and applying SWIGLU or GEGLU in the epilogue. It covers up to 16 columns and works for all six XMX types. Removed the temporary XMX_NOGLU environment switch Q2_K min-sum optimization Q2_K weight is d·scl·q − dmin·mc, where scl (the 4-bit scale) and mc (the 4-bit min code) apply to each half of a 32-weight group Added dispatch check and GRF sweep tg128 on Q4_K_M goes from 26.67 to 28.23 tok/s on the B70 (+5.9%). Q6_K is unchanged. MUL_MAT passes 1727/1727 and MUL_MAT_VEC_FUSION 1361/1361. Perplexity at batch 1 is 5.2064 with XMX and 5.2058 without. Renamed variables Added 2 environment variables GGML_SYCL_XMX_MAX_COLS (default 80, any value 0 or higher) and GGML_SYCL_XMX_GLU_MAX_COLS (default 16, range 0 to 16): the largest batch for the fused gate/up kernel. It is clamped to 16 because that is the most the fused kernel is compiled for, so the variable can only lower it. Update esimd.hpp All five quant structs were repeating the same boilerplate, so I moved it into shared pieces. A new helper xmx_term does one DPAS, converts it to float and scales it per row. The four branches are now one or two lines each, and the shared Cb += z * d8r is written once. The refactor passes all three op tests. MUL_MAT_VEC_FUSION is 1369/1369, MUL_MAT is 2281/2281 (the count includes your uncommitted f32 tests) and MUL_MAT_ID is 937/937. Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/58735943 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 評分42

llama.cpp 為 SYCL 後端加入分組 MoE XMX GEMM

llama.cpp 建置 b11493 為 SYCL 後端新增分組 MoE XMX GEMM 運算元(#29245),面向混合專家模型的矩陣乘加速。該版本同時放出全平台建置產物,覆蓋 macOS/iOS、Linux、Windows、Android 與 openEuler,包含 CUDA 12/13、ROCm 10.0、Vulkan、OpenVINO、SYCL FP32/FP16,以及 Snapdragon 的 CPU、Adreno GPU 與 Hexagon NPU 組合。

llama.cpp releasesAI 評分43

llama.cpp b11515:SYCL 加入 Q5_K 重排 MMVQ 與融合 GLU

llama.cpp 發布 b11515,主要變更是 SYCL 後端為 Q5_K 量化補上重排佈局的 MMVQ 核心,並加入融合 GLU(#29375),面向 Intel GPU 的量化推理。建置矩陣照舊覆蓋 macOS/iOS、Linux、Windows、Android 與 openEuler,包含 CUDA 12/13、ROCm 10.0、Vulkan、OpenVINO、SYCL FP32/FP16 等後端;

llama.cpp releasesAI 評分41

llama.cpp b11799 為 SYCL 後端加入 q8 快速反量化

llama.cpp 發布 b11799 建置,新增 SYCL 後端的 q8 快速反量化(#30775),可提升 Intel GPU 上量化模型的推理效率。該版本同時提供 macOS、Linux、Windows、Android 的多平台預編譯包,涵蓋 CUDA 12、CUDA 13、ROCm 10.0、Vulkan、OpenVINO 與 Snapdragon 的 CPU、Adreno GPU、Hexagon NPU 版本;SYCL 建置則分為 FP32 與 FP16 兩版。

llama.cpp releases● 精選AI 評分68

llama.cpp SYCL 為 GLM MLA 預填充接入 MKL,pp8192 提速 2.99 倍

llama.cpp 的 SYCL 後端放行了 GLM-4.7 Flash 的 MLA 形狀走 MKL flash attention,此前該形狀因 K/V 寬度不一致、head dim 上限 512 被排程器拒絕,預填充只能回退到更慢的 TILE kernel。在 Intel Arc Pro B70 上,pp8192 從 432.80 提升到 1292.29 tok/s(2.99 倍,+198.6%),tg256 在噪聲範圍內基本不變(45.67 對 45.65)。