Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
|
Documentation preview: https://vllm--31847.org.readthedocs.build/en/31847/ |
There was a problem hiding this comment.
Code Review
This pull request adds support for the Grok-2 model. The changes are comprehensive, including the model implementation, a new tiktoken-based tokenizer, and updates to documentation and tests. The model logic is cleanly adapted from the existing Grok-1 implementation to support both models. The new tokenizer for Grok-2 is also well-implemented. I've identified a couple of high-severity issues related to silent error handling in the new tokenizer, which could lead to incorrect behavior without any warning to the user. Addressing these will improve the robustness and debuggability of the new tokenizer.
|
cc @mgoin |
|
Hi @dangoldbj, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
83af8bf to
f3138e5
Compare
|
Hi @dangoldbj, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
@DarkLight1337 @ywang96 @mgoin Added Grok‑2 support (tiktoken tokenizer.tok.json tokenizer + Grok1/Grok2 model plumbing/weight mapping tweaks) and included registry/docs updates. I would appreciate a review. |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Head branch was pushed to by a user without write access
@DarkLight1337 Thanks for the review! Appreciate it! |
|
@DarkLight1337 Looks like the current Buildkite failures are likely infra/env, not from this PR’s diff.
This PR only touches Grok model/tokenizer + docs/tests. OK to merge/ignore? |
|
They are unrelated so we can merge. |
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Signed-off-by: dangoldbj <dangoldbj23@gmail.com>
Purpose
Add first-class vLLM support for Grok-2 models by extending tokenizer support, model registry resolution, execution wiring, tests, and documentation.
This change is not a config-only enablement. It introduces a tiktoken-based Grok-2 tokenizer with
.tok.jsonloading and Grok-style chat templates, wires Grok-family model configurations into the vLLM loading and execution paths, and ensures compatibility with existing inference behavior.Targeted tests and documentation updates are included to validate correctness and make Grok-2 usable in vLLM without downstream patches.
Test Plan
pytest tests/models/language/generation/test_grok.py -k grokpytest tests/tokenizers_/test_registry.py -k grok2Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.