AISpot

llama.cpp b11774 修復 LFM2 影像預處理,切片與網格對齊 transformers

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

llama.cpp 新建置 b11774 修正了 LFM2 系列視覺模型(LFM2-VL、LFM2.5-VL、d1-3B)的 mtmd 影像預處理,使切片與網格選擇與 Hugging Face transformers 一致。此前 llama.cpp 保留寬高比並補黑邊、只有 d1-omni 會拉伸,影像比例與網格不符時切片與 transformers 不同;現在設 PAD_NONE 即與 transformers 相同。

原標題:b11774
閱讀原文

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

原文

mtmd : lfm2 tiles and layout match transformers ( #30261 ) mtmd : lfm2 tiles stretch the image to the grid Lfm2VlImageProcessor.crop_image_to_patches resizes the image straight to (512 * rows, 512 * cols) before it cuts the tiles. llama.cpp kept the aspect ratio and added black bars for LFM2 (only d1-omni stretched), so the tiles of d1-3B and every LFM2-VL / LFM2.5-VL model differed from transformers unless the image had the aspect ratio of the grid. With PAD_NONE the tiles are the same as in transformers. mtmd : lfm2 layout with Python rounding in double precision Lfm2VlImageProcessor.smart_resize rounds with Python's round (half to even) and computes beta and the tile grid aspect ratio in double. llama.cpp used std::round and float, so 31926 of the 16.7M sizes in [1,4096]^2 got another thumbnail size or grid than transformers (and d1-omni vision.py), e.g. 400x600 -> 416x608 instead of 384x608 and 720x1600 -> 2x5 tiles instead of 2x4. The lfm2 smart resize and grid choice now follow the Python code and match it on every size of that range. fix Co-authored-by: Xuan Son Nguyen [email protected] Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/58040210 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 改為從 GGUF 後設資料讀取 LFM2-VL 切圖引數

llama.cpp 新建置 b11767 讓 LFM2-VL 的影像切分引數改由 GGUF 後設資料決定,不再寫死在程式碼裡。轉換 LFM2-VL mmproj 時會把 processor_config.json 中的 min_tiles、max_tiles、tile_size 和 max_pixels_tolerance 寫入模型,clip.cpp 讀取這些值,缺失時回退到原有常量。

llama.cpp releasesAI 評分23

llama.cpp 發布 b11397,CUDA 後端調整 neu_padded 位置

llama.cpp 發布建置版本 b11397,主要變更是將 CUDA 後端的 neu_padded 移動到實際使用位置(PR #29940),作者為 Hugging Face 的 Adrien Gallouët。該版本繼續提供 macOS、Linux、Windows、Android 等多平台預編譯包,覆蓋 Apple Silicon、CUDA 12/13、ROCm 10.0、Vulkan、SYCL、OpenVINO 等後端;

llama.cpp releasesAI 評分45

llama.cpp 建置 b11448:ggml-cuda 分塊處理大塊 BF16/FP16 轉 F32

llama.cpp 發布建置 b11448,ggml-cuda 後端把大塊 BF16/FP16 到 F32 的轉換改為分塊執行(#29442),並修正分塊 cuBLAS 矩陣乘法未遵循目標 stride 的問題,提交由 Johannes Gäßler 參與。改動僅涉及 CUDA 後端,影響用 NVIDIA GPU 做本地推理的場景;該建置同時覆蓋 macOS Apple Silicon 與 Linux、Windows 的 CUDA 12/13 等平台。