AISpot

llama.cpp 的 GGUF 寫入器跳過主機張量暫存複製

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

llama.cpp 合併 ggml 改動(#31144):GGUF 寫入器此前會把每個張量先拷進臨時 vector 再寫檔案,現在對 host-buffer 張量直接寫盤,省去逐張量的分配、零初始化與 memcpy。這是建置期最佳化,不改變 GGUF 格式,同時隨附 macOS、Linux、Windows、Android 等平台建置產物清單。

原標題:b12101
閱讀原文

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

原文

ggml : write host-buffer tensor data directly in gguf writer ( #31144 ) The gguf writer staged each tensor into a temporary vector before writing it. For host-buffer tensors the data pointer is directly writable, so skip the staging copy and write it straight to the file. This avoids the per-tensor allocation, zero-init and memcpy. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4-Flash-Vision-Exp-GGUF (Mac Studio, M2 Ultra, 192GB) Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/63489033 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 評分43

llama.cpp 修復 gguf-split 對截斷 GGUF 靜默輸出損壞張量

llama.cpp 建置 b11727 為 gguf-split 和 export-lora 加上張量資料邊界檢查與短讀檢查,輸入 GGUF 檔案被截斷時直接拒絕,不再靜默產出損壞的張量資料。修復點位於 gguf-split.cpp 的 copy_file_to_file(split_strategy)與 export-lora.cpp 的 read_tensor_data,並附帶回歸測試,驗證截斷輸入被拒絕、合法張量資料仍被保留。

llama.cpp releasesAI 評分45

llama.cpp 新增 ggml 批次張量複製 API,並支援 CUDA

llama.cpp 建置 b12002 為 ggml 加入通用批次張量複製 API,並把 llama 的 context io 改為按批次執行裝置張量複製。新 API 已獲 CUDA 後端支援,會按緩衝區型別分組排程,同時移除了舊的非同步 tensor_n 介面並補上空緩衝區鉤子,還修復了二維批次張量的識別問題。測試方面,test-backend-tensor 經過重構,用 mock 緩衝區型別驗證鉤子呼叫、逐張量回退,以及 cpy_tensor_n 的全有全無語義。

llama.cpp releasesAI 評分46

llama.cpp 修復 ggml_acc 負偏移導致的越界寫

llama.cpp 建置 b11529 修復了 ggml 中 ggml_acc 的越界寫漏洞:ggml_acc_impl 將 size_t 偏移量收窄為 int32_t 時未做檢查,超大偏移會截斷成負數,再被符號擴充套件為巨大 size_t 導致邊界斷言失效,可在 dst 緩衝區下方越界寫入。修復方式是在收窄前檢查偏移量,與 ggml_set_impl 中已有檢查保持一致。該版本同時提供 macOS、Linux、Windows、Android 等多平台預編譯包。

llama.cpp releasesAI 評分37

llama.cpp b12054:ggml-zdnn 與主機共享緩衝區

llama.cpp 發布 b12054 建置,合併的主要變更是 ggml-zdnn 後端改為與主機共享緩衝區,該後端用於 IBM s390x 上的 zDNN 加速。同批建置仍提供 Ubuntu、Windows、Android、macOS 的預編譯包,覆蓋 CUDA 12/13、ROCm 10.0、Vulkan、SYCL、OpenVINO、OpenCL Adreno 及 Snapdragon CPU/Adreno GPU/Hexagon NPU。