Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 19 commits into from
Oct 25, 2024

Conversation

DarkSharpness
Copy link
Contributor

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.

python/sglang/srt/managers/schedule_batch.py Outdated Show resolved Hide resolved
python/sglang/srt/managers/schedule_batch.py Outdated Show resolved Hide resolved
python/sglang/srt/managers/schedule_batch.py Outdated Show resolved Hide resolved
python/sglang/srt/managers/scheduler.py Outdated Show resolved Hide resolved
@merrymercy merrymercy mentioned this pull request Oct 23, 2024
33 tasks
@merrymercy merrymercy enabled auto-merge (squash) October 25, 2024 21:30
@merrymercy merrymercy merged commit b77a02c into sgl-project:main Oct 25, 2024
12 checks passed
qeternity pushed a commit to qeternity/sglang that referenced this pull request Oct 27, 2024
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