Conversation
…sages + async grpo
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
cc @Rocketknight1 for the schema |
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3fc2ca8. Configure here.
| ``` | ||
| """ | ||
| if tokenizer.chat_template == glm4moe_chat_template: | ||
| tokenizer.response_schema = glm4moe_schema |
There was a problem hiding this comment.
Missing return statement in GLM-4-MoE branch
High Severity
The glm4moe branch in add_response_schema sets the response_schema but is missing a return tokenizer statement. Execution falls through to the final ValueError, causing add_response_schema to always fail for GLM-4-MoE tokenizers. This breaks tool-calling support, for example, during GRPOTrainer initialization.
Reviewed by Cursor Bugbot for commit 3fc2ca8. Configure here.


<tool_call>name\n<arg_key>...<arg_value>...format) (done by Claude)glm4moe.jinjatemplate for identity matching inadd_response_schemaTestAddResponseSchemaandTestParseResponsetest parametrizationsPart of #5460
Warning
Requires/contains #5459
Note
Medium Risk
Adds a new response-parsing regex/schema and chat-template identity match for GLM-4-MoE; incorrect regex or template mismatches could cause tool-call parsing failures or mis-parsed assistant content.
Overview
Adds GLM-4-MoE tool-calling support by introducing a new
glm4moe.jinjaidentity template and wiringadd_response_schema()to attach a GLM-4-MoE-specificresponse_schemathat parses<tool_call>...<arg_key>...<arg_value>...formatted calls.Extends the chat template utilities test suite to run
add_response_schema/parse_responseparametrizations against a GLM-4-MoE tiny model, and updates GRPO agent-training docs to list GLM-4-MoE as a tested/supported model.Reviewed by Cursor Bugbot for commit 3fc2ca8. Bugbot is set up for automated code reviews on this repo. Configure here.