Skip to content

[Performance] Support both xgrammar and outlines for constrained decoding#1752

Merged
merrymercy merged 19 commits intosgl-project:mainfrom
DarkSharpness:xgrammar-outlines
Oct 25, 2024
Merged

[Performance] Support both xgrammar and outlines for constrained decoding#1752
merrymercy merged 19 commits intosgl-project:mainfrom
DarkSharpness:xgrammar-outlines

Conversation

@DarkSharpness
Copy link
Copy Markdown
Collaborator

Motivation

This pull request is a continuation of PR #1680.

This pull request allows users to choose between xgrammar and outlines.

Modifications

Key modifications include:

  • Added support for both xgrammar and outlines as grammar backends.
  • Users can select their preferred backend by passing the grammar-backend option in the command line.
  • The default backend is set to outlines.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

Comment thread python/sglang/srt/managers/schedule_batch.py Outdated
Comment thread python/sglang/srt/managers/schedule_batch.py Outdated
Comment thread python/sglang/srt/managers/schedule_batch.py Outdated
Comment thread python/sglang/srt/managers/scheduler.py Outdated
@merrymercy merrymercy mentioned this pull request Oct 23, 2024
37 tasks
@merrymercy merrymercy enabled auto-merge (squash) October 25, 2024 21:30
@merrymercy merrymercy merged commit b77a02c into sgl-project:main Oct 25, 2024
@zhaochenyang20 zhaochenyang20 mentioned this pull request Mar 3, 2025
22 tasks
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
@DarkSharpness DarkSharpness deleted the xgrammar-outlines branch June 19, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants