AISpot

llama.cpp 修復 jinja tojson 浮點數精度丟失

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

llama.cpp 新建置 b11622 修復了 jinja 模板 tojson 的浮點數輸出。此前 tojson 通過 C++ 流列印浮點,只有 6 位有效數字且省略 .0,48.858844 會變成 48.8588、1.0 變成 1,影響工具定義、工具呼叫引數和其他模板輸出。現在改為輸出能讀回同一數值的最短數字,與 Python 的 json.dumps 一致,float 的 string 與 safe 過濾器也共用這段邏輯。

原標題:b11622
閱讀原文

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

原文

jinja : write floats in tojson as Python does ( #30362 ) tojson printed floats through a C++ stream (6 significant digits, no ".0"), so 48.858844 became 48.8588 and 1.0 became 1 in tool definitions, tool-call arguments and other template output. Write the shortest digits that read back as the same value, as json.dumps does. The string and safe filters of a float use the same code. Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/55977610 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 評分37

llama.cpp b11539 應用上游深層巢狀 JSON 補丁

llama.cpp 發布 b11539 建置,唯一程式碼改動是應用來自上游的深層巢狀 JSON 補丁(#30253)。各平台預編譯包照常提供,覆蓋 macOS/iOS、Ubuntu(CPU、Vulkan、CUDA 12/13、ROCm 10.0、OpenVINO、SYCL)、Android、Windows 以及 openEuler。其中 macOS Apple Silicon 的 KleidiAI 啟用版和 openEuler 建置本次被標記為 DISABLED。

llama.cpp releasesAI 評分48

llama.cpp 修復 Ling 3.0 解析器忽略 json_schema 的問題

llama.cpp 合併 PR #29813,讓 Ling 3.0 解析器開始遵循 inputs.json_schema。此前 Ling 3.0 只為工具呼叫建置語法,response_format 請求不受約束;新實現加入優先於工具的回應格式語法路徑,並在啟用思考時要求先輸出 think 塊、JSON 回應後不允許追加散文。該修復對應 issue #29652,隨新版建置覆蓋 macOS、Linux、Windows、Android 等平台。

llama.cpp releasesAI 評分40

llama.cpp b11538 修復 MSVC 下 CUDA 舍入問題

llama.cpp 發布 b11538 建置,修復 CUDA 後端的舍入問題,使 MSVC 下 CPU 與 GPU 的計算結果一致。本次發布包覆蓋 macOS/iOS、Linux、Windows、Android 與 openEuler,其中 CUDA 12/13 預編譯包分別對應 CUDA 12.8 與 13.4 庫,Linux 與 Windows x64 另有 ROCm 10.0、OpenVINO、SYCL、Vulkan 建置,Snapdragon 平台提供 CPU、Adr…