llama.cpp b9743 Fixes a Hidden JSON Grammar Bug That Could Break Your Structured Outputs
117k-star GitHub project aligns schema parsing rules across all platforms
The llama.cpp project, a popular open-source C/C++ implementation for running large language models locally, has rolled out version b9743. This release, authored by github-actions and signed with a verified GPG key, focuses on a single but impactful change: aligning the spacing rules in the JSON schema to grammar conversion with the actual parsers. Specifically, commit c576070 modifies `common/json-schema-to-grammar` to ensure that whitespace handling matches what parsers expect, reducing errors when converting structured JSON schemas into the grammar format used by llama.cpp's inference engine.
For developers building applications on top of llama.cpp—whether for chatbots, RAG pipelines, or local agent workflows—this fix eliminates a subtle class of bugs where grammars derived from JSON schemas would produce unexpected tokens due to spacing mismatches. The release also demonstrates the project's robust cross-platform support, with pre-built binaries listed for macOS (including KleidiAI-enabled Apple Silicon), multiple Linux configurations (CPU, Vulkan, ROCm 7.2, OpenVINO, SYCL), Windows (CPU, CUDA 12/13, Vulkan, OpenCL Adreno), Android arm64, and special openEuler builds. With 117k stars and 19.8k forks on GitHub, llama.cpp remains the go-to tool for running models like Llama, Mistral, and Gemma on consumer hardware.
- Fix aligns spacing rules between JSON schema and grammar parsers for consistent token generation
- Pre-built binaries offered for macOS (arm64/x64), Linux (CPU + GPU backends), Windows (CUDA 12/13, Vulkan), Android arm64, and openEuler
- Commit signed with GitHub's verified GPG key (ID B5690EEEBB952194) for authenticity
Why It Matters
Eliminates a parsing edge case that could break structured generation in local LLM workflows