You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some use cases, we don’t need the entire output to strictly follow a defined grammar, but only a specific segment of the generation. It would be great to support partial guided decoding, where structured output is enforced only within defined token boundaries.
For example:
Guided decoding begins at <json> and ends at </json>
Or for markdown, it starts at ```json and ends at ```
This would make guided decoding more flexible and broadly applicable to tasks where only a partial defined structure is needed (e.g., code generation or agent tool).
Alternatives
Currently, vLLM supports a guided_grammar option that allows context-free grammar-based customization. However, using it for partial guided decoding introduces additional complexity and isn’t as intuitive for cases where a pre-defined structure (such as JSON) is only required in segments of the output.
Additional context
No response
Before submitting a new issue...
Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
The text was updated successfully, but these errors were encountered:
🚀 The feature, motivation and pitch
In some use cases, we don’t need the entire output to strictly follow a defined grammar, but only a specific segment of the generation. It would be great to support partial guided decoding, where structured output is enforced only within defined token boundaries.
For example:
<json>
and ends at</json>
This would make guided decoding more flexible and broadly applicable to tasks where only a partial defined structure is needed (e.g., code generation or agent tool).
Alternatives
Currently, vLLM supports a
guided_grammar
option that allows context-free grammar-based customization. However, using it for partial guided decoding introduces additional complexity and isn’t as intuitive for cases where a pre-defined structure (such as JSON) is only required in segments of the output.Additional context
No response
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: