-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Checklist
- 1. If the issue you raised is not a feature but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
- 2. Please use English, otherwise it will be closed.
Motivation
xgrammar supports EBNF. We would like to integrate this feature into SGLang.
We can add a new parameter called ebnf
in sampling_params.py and treat it similar to regex and JSON.
Related resources
https://xgrammar.mlc.ai/docs/how_to/ebnf_guided_generation.html
sglang/python/sglang/srt/sampling/sampling_params.py
Lines 36 to 38 in f5b2a3a
regex: Optional[str] = None, | |
n: int = 1, | |
json_schema: Optional[str] = None, |
https://github.com/sgl-project/sglang/blob/main/test/srt/test_json_constrained.py
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed