Repository navigation
Conversation
|
@DIYA73, tried to run the suite locally against your branch. Two things actually:
Adding those two lines moves test_bridge.py from an error to 23 passed.
Two more things:
|
|
Thanks for the thorough review. Fixed in 30e004e: Added Mistral3Renderer import + "mistral-3" entry to _populate_registry() Full suite now: 989 passed in test_reasoning_boundaries.py, 0 failed. |
30e004e to
b294b3b
Compare
Hard-coded Python renderer mirroring the Mistral-3 [INST]/[/INST] v3 chat template. Covers: - mistralai/Mistral-Small-3.1-24B-Instruct-2503 - mistralai/Mistral-Small-3.2-24B-Instruct-2506 - mistralai/Mistral-Nemo-Instruct-2407 Adds Mistral3Renderer, Mistral3RendererConfig, parse_mistral3, and MODEL_RENDERER_MAP entries for all three checkpoints. Parity test catalog entry added for Mistral-Small-3.1.
- Register Mistral3Renderer in _populate_registry() (missing import + registry entry); without this create_renderer raised ValueError - Add 'mistral-3' to no-reasoning exclusion sets in test_reasoning_boundaries.py (same pattern as 'llama-3') - Set roundtrip=False for Mistral-Small-3.1 in parity catalog: tokenizer.chat_template is None on the Hub so the oracle cannot produce a reference rendering - Drop Mistral-Small-3.2 from MODEL_RENDERER_MAP: tokenizer fails to load (backend instantiation error with and without fix_mistral_regex) Fixes all 4 issues raised in review by awesome-pro. :wq:wq#
b294b3b to
ddecce7
Compare
What
Hard-coded Python renderer mirroring the Mistral-3
[INST]/[/INST]v3 chat template, following the same pattern asLlama3Renderer.Covers
mistralai/Mistral-Small-3.1-24B-Instruct-2503mistralai/Mistral-Small-3.2-24B-Instruct-2506mistralai/Mistral-Nemo-Instruct-2407Changes
renderers/mistral3.py—Mistral3Rendererwithrender,parse_response,bridge_to_next_turnrenderers/parsing.py—parse_mistral3(detects[TOOL_CALLS]-anchored tool-call arrays)renderers/configs.py—Mistral3RendererConfigrenderers/base.py—MODEL_RENDERER_MAPentries for all three checkpointsrenderers/__init__.py— lazy-load registration and__all__tests/parity.py— catalog entry forMistral-Small-3.1Validation
uv run pytest tests/ -x -q: 9588 passed, 146 skippedNote
Add
Mistral3Rendererfor Mistral-3.x Instruct chat renderingMistral3Renderer, which renders system, user, assistant, tool, and ipython messages into the Mistral-3 control-token format and emits assistant tool calls as a JSON array.Mistral3RendererConfigto theRendererConfigunion and registersmistral-3in the renderer and config registries; the Mistral-Small 3.1 Instruct and Mistral-Nemo Instruct model IDs map to it automatically.parse_mistral3in parsing.py to parse completion text and tool-call JSON after the tool-call marker, with EOS as the only stop token.bridge_to_next_turnreuses a prior prompt through its EOS close and appends new user/tool turns;renderacceptstoolsbut does not emit tool definitions, and unsupported roles raise errors.mistral-3from several reasoning-boundary test parameterizations in test_reasoning_boundaries.py and adds the Mistral-Small 3.1 checkpoint to the parity catalog with roundtrip and some tool-call suites disabled.mistral-3constructs raise errors when required special tokens are missing from the tokenizer vocabulary; check_token_idin mistral3.py if tokenizer load changes.Macroscope summarized ddecce7.