PulseAugur
EN
LIVE 18:09:52

Developer adds GBNF grammar support to ShapeCraft for local LLM output control

A developer has enhanced the ShapeCraft structured output library by adding support for GBNF grammars, enabling local LLMs to generate output that strictly adheres to predefined formats. This new feature, implemented via a `gbnf` schema type, prevents models from producing malformed responses, a common issue with local deployments. The implementation includes a native `llama.cpp` backend that enforces grammars at the token level, and a best-effort approach for other backends like OpenAI and Groq where the grammar is injected into the prompt and the output is validated. AI

IMPACT Enables more reliable structured output from local LLMs, reducing errors in automated workflows.

RANK_REASON Developer adds new functionality to an existing library.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Developer adds GBNF grammar support to ShapeCraft for local LLM output control

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Yatin Davra ·

    I Had a GBNF Grammar File and Nowhere to Point It. So I Added Support for It.

    <p>I was building a classification step that had to run entirely on a local model - no cloud calls, straight through llama.cpp. Read a chunk of text, output exactly one of a handful of fixed labels. It ran in a tight, low-latency loop with basically no retry budget, and local mod…