support regex in xgrammar backend (#2983)
This commit is contained in:
committed by
GitHub
parent
2c05f81f15
commit
3bcf5ecea7
@@ -219,7 +219,7 @@
|
||||
"SGLang supports two grammar backends:\n",
|
||||
"\n",
|
||||
"- [Outlines](https://github.com/dottxt-ai/outlines) (default): Supports JSON schema and regular expression constraints.\n",
|
||||
"- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema and EBNF constraints.\n",
|
||||
"- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema, regular expression, and EBNF constraints.\n",
|
||||
" - XGrammar currently uses the [GGML BNF format](https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md)\n",
|
||||
"\n",
|
||||
"Initialize the XGrammar backend using `--grammar-backend xgrammar` flag\n",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"SGLang supports two grammar backends:\n",
|
||||
"\n",
|
||||
"- [Outlines](https://github.com/dottxt-ai/outlines) (default): Supports JSON schema and regular expression constraints.\n",
|
||||
"- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema and EBNF constraints and currently uses the [GGML BNF format](https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md).\n",
|
||||
"- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema, regular expression, and EBNF constraints.\n",
|
||||
" - XGrammar currently uses the [GGML BNF format](https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md)\n",
|
||||
"\n",
|
||||
"We suggest using XGrammar whenever possible for its better performance. For more details, see [XGrammar technical overview](https://blog.mlc.ai/2024/11/22/achieving-efficient-flexible-portable-structured-generation-with-xgrammar).\n",
|
||||
"\n",
|
||||
|
||||
@@ -189,7 +189,7 @@ You can specify a JSON schema, regular expression or [EBNF](https://en.wikipedia
|
||||
SGLang supports two grammar backends:
|
||||
|
||||
- [Outlines](https://github.com/dottxt-ai/outlines) (default): Supports JSON schema and regular expression constraints.
|
||||
- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema and EBNF constraints.
|
||||
- [XGrammar](https://github.com/mlc-ai/xgrammar): Supports JSON schema, regular expression, and EBNF constraints.
|
||||
- XGrammar currently uses the [GGML BNF format](https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md)
|
||||
|
||||
Initialize the XGrammar backend using `--grammar-backend xgrammar` flag
|
||||
|
||||
Reference in New Issue
Block a user