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

[Bug]: XGrammar-based CFG decoding degraded after 0.6.5 #12122

Open
1 task done
AlbertoCastelo opened this issue Jan 16, 2025 · 1 comment
Open
1 task done

[Bug]: XGrammar-based CFG decoding degraded after 0.6.5 #12122

AlbertoCastelo opened this issue Jan 16, 2025 · 1 comment
Labels
bug Something isn't working structured-output

Comments

@AlbertoCastelo
Copy link

Your current environment

Tested in 3 environments with 8xH100:

  • public.ecr.aws/q9t5s3a7/vllm-ci-test-repo:61c1d499f07d3a50e3721a38f3f54a721f3eaf65
    • CI version before v0.6.5 that contained XGrammars (v0.6.4.post2 did not contained XGrammars).
    • This image no longer exists.
  • v0.6.5
  • v0.6.6.post1

Model Input Dumps

extra_body = {
    "guided_grammar": grammar,
    "guided_decoding_backend": "xgrammar",  # optional
}
    
chat_completion = client.chat.completions.create(
    model=model,
    messages=messages,
    stream=True,
    temperature=0,
    max_tokens=1024,
    timeout=timeout,
    extra_body=extra_body,
    stream_options={"include_usage": True},
)

🐛 Describe the bug

XGrammars guided decoding both for Time to first token (TTFT) and overall response time. I've tested 2 versions with a Llama3-70b:

  • A CI version before v0.6.5 that contained XGrammars (v0.6.4.post2 did not contained XGrammars). This is the exact image I was using: public.ecr.aws/q9t5s3a7/vllm-ci-test-repo:61c1d499f07d3a50e3721a38f3f54a721f3eaf65
    • TTFT P50: ~0.6s
  • v0.6.5 and v0.6.6.post1:
    • TTFT P50: ~4s

Related issue affecting Outlines

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.
@mgoin
Copy link
Member

mgoin commented Jan 16, 2025

Could you share the grammar used? It might be that we fallback a non-xgrammar backend due to a bad detection heuristic. FYI @russellb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working structured-output
Projects
None yet
Development

No branches or pull requests

3 participants