AISpot

llama.cpp b11851 讓 LFM2 影像縮放與 torchvision 對齊

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

llama.cpp 新建置 b11851 中,LFM2、LFM2-VL 與 d1-omni 的影像預處理(雙線性與雙三次縮放)改為與 torchvision 輸出一致,此前 Pillow 移植版在約 1%(d1-omni、LFM2.5-VL)和約 0.25%(d1-3B)的裁剪畫素值上偏差 1–2 級。

原標題:b11851
閱讀原文

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

原文

mtmd : lfm2 resize matches torchvision ( #30943 ) mtmd : lfm2 bilinear resize matches torchvision Lfm2VlImageProcessor and d1-omni vision.py resize uint8 images with torchvision (antialias=True). That is Pillow's algorithm, except that the weights are int16 with as many fractional bits as the largest weight allows, where Pillow uses 22 bits. The Pillow port was 1-2 levels off on about 1% of the values of the d1-omni and LFM2.5-VL crops. RESIZE_ALGO_BILINEAR_TORCH rounds the weights of the Pillow port to that precision and scales them back to 22 bits, which gives the output of torchvision with the same passes, and "bilinear" maps to it for LFM2 and d1-omni. Other models keep the Pillow algorithms. mtmd : lfm2 bicubic resize matches torchvision Lfm2VlImageProcessor resizes with torchvision for the bicubic checkpoints too (d1-3B, LFM2-VL), so "bicubic" maps to RESIZE_ALGO_BICUBIC_TORCH for LFM2: the Pillow bicubic filter (a = -0.5, as torchvision with antialias) with the int16 weights of torchvision. The Pillow port was 1-2 levels off on about 0.25% of the values of the d1-3B crops. use bitfield, add hparams setter Co-authored-by: Xuan Son Nguyen [email protected] Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/59362598 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 評分40

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

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

llama.cpp releasesAI 評分32

llama.cpp b11808:dflash 支援可選 FC 輸入縮放

llama.cpp 發布建置 b11808,主要改動是 dflash 支援載入可選的 FC 輸入縮放(#30945),該改動由 Codex 協助完成。本版照例提供各平台預編譯包,覆蓋 macOS/iOS、Linux(含 CUDA 12/13、ROCm 10.0、Vulkan、SYCL、OpenVINO)、Windows、Android 與 openEuler,Snapdragon 平台同時支援 CPU、Adreno GPU 與 Hexagon NPU。

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 讀取這些值,缺失時回退到原有常量。