Repository navigation
[Rust Frontend] Add native GLM-5.3 / GLM-5.3-Flash chat rendering - #62424
Merged
Merged
Conversation
zRzRzRzRzRzRzR
requested review from
BugenZhao,
DarkLight1337,
ProExpertProg,
WoosukKwon,
houseroad,
mgoin,
njhill,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256 and
youkaichao
as code owners
October 19, 2026 08:32
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Merged
1 of 4 tasks
BugenZhao
reviewed
Oct 21, 2026
| pub const INKLING_LITERAL: &str = "inkling"; | ||
| pub const INKLING_MODEL_TYPE: &str = "inkling_mm_model"; | ||
| pub const KIMI_K3_LITERAL: &str = "kimi_k3"; | ||
| pub const GLM5_NEXT_LITERAL: &str = "glm5_next"; |
Member
There was a problem hiding this comment.
Do you think it would also be good to enhance resolve so that auto can be resolved to Glm5Next as well?
Contributor
Author
Add a `glm5_next` renderer that renders GLM-5.3 and GLM-5.3-Flash prompts natively instead of through MiniJinja, emitting token IDs directly with control tokens split from literal text. `--tokenizer-mode auto` selects it when the checkpoint ships one of the GLM-5.3 / GLM-5.3-Flash templates it reproduces; GLM-5 through GLM-5.2 share the `glm_moe_dsa` model type with other templates and keep the `hf` renderer. `--tokenizer-mode glm5_next` selects it explicitly. Multimodal preprocessing for GLM-5.3-Flash is left to llm-multimodal (smg-project/smg#4036); until the dependency includes it, image and video requests on the Rust frontend are rejected. Signed-off-by: zRzRzRzRzRzRzR <Yuxuan.Zhang2@liverpool.ac.uk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
added a commit
to vllm-project/recipes
that referenced
this pull request
Oct 28, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
6 tasks done
vllm-project#64274 rejects --chat-template and request chat_template for every native renderer with dedicated errors, so the GLM renderer no longer needs its own checks reporting them as template-thrown errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCcGvxthRCnUBx9uvW3oU5 Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Member
|
/ci run |
|
✅ Triggered Buildkite CI #97961 for commit ℹ️ This PR is 1 commit behind upstream |
github-actions Bot
added a commit
to vllm-project/recipes
that referenced
this pull request
Oct 29, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Isotr0py
approved these changes
Oct 30, 2026
Isotr0py
enabled auto-merge (squash)
October 30, 2026 05:04
Member
|
/ci run |
|
✅ Triggered Buildkite CI #98574 for commit ℹ️ This PR is 29 commits behind upstream |
github-actions Bot
added a commit
to vllm-project/recipes
that referenced
this pull request
Oct 30, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Isotr0py
temporarily deployed
to
recipes-preview
October 30, 2026 06:35 — with
GitHub Actions
Inactive
vllm-recipes-publisher Bot
pushed a commit
to vllm-project/recipes
that referenced
this pull request
Oct 30, 2026
vllm-project/vllm@main:recipes d0d3005affa3 → d14f72c7fe13 [latest.vllm] vllm-project/vllm@d0d3005...d14f72c Commits: - vllm-project/vllm@d14f72c7fe13 [Rust Frontend] Add native GLM-5.3 / GLM-5.3-Flash chat rendering (vllm-project/vllm#62424) Recipes: - zai-org/GLM-5.3-Flash (modified): https://recipes.vllm.ai/zai-org/GLM-5.3-Flash - zai-org/GLM-5.3 (modified): https://recipes.vllm.ai/zai-org/GLM-5.3 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot
added a commit
to Yogaraj-Alamenda/recipes
that referenced
this pull request
Oct 30, 2026
vllm-project/vllm@main:recipes f81a414faed6 → a20280f30e31 [latest.vllm] vllm-project/vllm@f81a414...a20280f Commits: - vllm-project/vllm@d14f72c7fe13 [Rust Frontend] Add native GLM-5.3 / GLM-5.3-Flash chat rendering (vllm-project/vllm#62424) - vllm-project/vllm@d0d3005affa3 [Doc] Kimi-K3: move the GB300 AgentX presets to the Oct 26 points with KV-balanced decode (vllm-project/vllm#64665) Recipes: - moonshotai/Kimi-K3 (modified): https://recipes.vllm.ai/moonshotai/Kimi-K3 - zai-org/GLM-5.3-Flash (modified): https://recipes.vllm.ai/zai-org/GLM-5.3-Flash - zai-org/GLM-5.3 (modified): https://recipes.vllm.ai/zai-org/GLM-5.3 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
6 tasks done
github-actions Bot
added a commit
to yiminghub2024/recipes
that referenced
this pull request
Oct 30, 2026
vllm-project/vllm@main:recipes f81a414faed6 → 617135eed34b [latest.vllm] vllm-project/vllm@f81a414...617135e Commits: - vllm-project/vllm@d14f72c7fe13 [Rust Frontend] Add native GLM-5.3 / GLM-5.3-Flash chat rendering (vllm-project/vllm#62424) - vllm-project/vllm@d0d3005affa3 [Doc] Kimi-K3: move the GB300 AgentX presets to the Oct 26 points with KV-balanced decode (vllm-project/vllm#64665) Recipes: - moonshotai/Kimi-K3 (modified): https://recipes.vllm.ai/moonshotai/Kimi-K3 - zai-org/GLM-5.3-Flash (modified): https://recipes.vllm.ai/zai-org/GLM-5.3-Flash - zai-org/GLM-5.3 (modified): https://recipes.vllm.ai/zai-org/GLM-5.3 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot
added a commit
to monkeyLoveding/recipes
that referenced
this pull request
Oct 30, 2026
…mni@cda4a1ef83b2 vllm-project/vllm@main:recipes 8084f0624dba → 24420b7a341a [latest.vllm] vllm-project/vllm@8084f06...24420b7 Commits: - vllm-project/vllm@d14f72c7fe13 [Rust Frontend] Add native GLM-5.3 / GLM-5.3-Flash chat rendering (vllm-project/vllm#62424) - vllm-project/vllm@d0d3005affa3 [Doc] Kimi-K3: move the GB300 AgentX presets to the Oct 26 points with KV-balanced decode (vllm-project/vllm#64665) Recipes: - moonshotai/Kimi-K3 (modified): https://recipes.vllm.ai/moonshotai/Kimi-K3 - zai-org/GLM-5.3-Flash (modified): https://recipes.vllm.ai/zai-org/GLM-5.3-Flash - zai-org/GLM-5.3 (modified): https://recipes.vllm.ai/zai-org/GLM-5.3 vllm-project/vllm-omni@main:recipes e45e43bcc1d4 → cda4a1ef83b2 [latest.vllm-omni] vllm-project/vllm-omni@e45e43b...cda4a1e Commits: - vllm-project/vllm-omni@b5a6fd836185 [Model] MiniMax-H3: Continue a previous video from cached latents across requests (vllm-project/vllm-omni#9342) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add native Rust GLM5Next chat rendering for GLM-5.3 and GLM-5.3-Flash, including tool calls and reasoning options. Rust
autoselects it for theglm5_nextmodel type (GLM-5.3-Flash); GLM-5.3 sharesglm_moe_dsawith GLM-5 through GLM-5.2, so it uses--tokenizer-mode glm5_nextexplicitly.Claims
Validation
After syncing upstream
mainthrough94a29d316eon 2026-10-25:cd rust && cargo test -p vllm-chat -p vllm-server -p vllm-cmd --lib --locked --offline -- --test-threads=1: 442 chat tests and 510 server tests passed.cd rust && cargo test -p vllm-cmd --bin vllm-rs --locked --offline -- --test-threads=1: 93 CLI tests passed.cd rust && cargo clippy -p vllm-chat -p vllm-server -p vllm-cmd --lib --bins --tests --locked --offline -- -D warnings: passed.The tests cover rendered prompts, complete token IDs, auto renderer selection, and in-process HTTP routes with the existing scripted engine. The final additional upstream Preload commit does not change the tested Rust or GLM configuration files.
Tool-choice regression: fails before the fix, passes after
The initial merged tree passed 441 chat tests but failed the existing GLM/HF prompt parity test: with
tool_choice="none", GLM omitted the tool definitions that HF rendered. The new HTTP render-route regression reproduced the same bug before removing the renderer's extra parsing gate:After the fix, both the existing GLM/HF parity test and the new route test pass in the suites above. The route test checks that tool definitions remain by default and are removed when
--exclude-tools-when-tool-choice-noneis enabled. The Rust workspace Buildkite job selects this test.Previous author-reported frontend benchmarks compared both templates against HF MiniJinja with identical requests, 4 server CPU cores, concurrency 64, and two 4-second runs per configuration:
These measurements cover frontend rendering and tokenization, excluding model inference, and were not rerun for this upstream sync. GPU serving and model evaluations were not rerun on the local macOS host.
Details
This PR adds chat rendering; multimodal preprocessing is owned by
llm-multimodal, with the GLM processor work handled in smg-project/smg#4036. The Python frontend continues to use the HF tokenizer and renderer. The tokenizer-mode docstring generates the user-facing argument reference, both GLM recipes include deployment examples, and the tool-calling guide documents the default tool-definition policy for the native GLM renderer.Both
glm5_nextand upstream'salpamayo2_supertokenizer modes are preserved. GLM tool definitions follow the effective tool list; the server owns the exclusion policy, rather than the renderer's tool-parsing flag. Chat Completions conversion retains empty explicit reasoning strings;reasoning/reasoning_contentare vLLM extensions absent from the OpenAI OpenAPI 2.3.0 assistant-message schema checked on 2026-10-25.Rejecting
--chat-templateand requestchat_templatefor native renderers, includingglm5_next, is handled generically in #64274.Duplicate-work check: this continues the existing native GLM renderer PR; the earlier GLM/Rust/tokenizer search found no other PR implementing the same renderer.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.