ggerganov/llama.cpp Released b12323 with Gemma 4 Parser Refactor
Llama.cpp release b12323 introduces a refactoring of Gemma 4 tool argument parsing to use loose schema rules and a schema-shaped PEG parser. It also cleans up old workarounds and removes dynamic casts to simplify the codebase. This update improves how local models handle tool calls and function arguments by enforcing flexible structure rules. Such refinements ensure better compatibility and stability when running models locally across various client applications. The update builds a schema-shaped Parsing Expression Grammar (PEG) parser specifically for Gemma 4 tool arguments, adding numerical rule names and depth guards while removing dynamic casting.
## BACKGROUND
llama.cpp is an open-source software library that performs inference on various large language models and serves as a core backend for local AI tools. Parsing Expression Grammars (PEGs) are a type of analytic formal grammar used in computer science to structure and recognize text strings precisely.