Skip to content

Train the tiny DeepSeek-R1-Distill model in the SFT test - #7187

Open
albertvillanova wants to merge 1 commit into
mainfrom
cover-tiny-r1-distill-in-sft-train
Open

Train the tiny DeepSeek-R1-Distill model in the SFT test#7187
albertvillanova wants to merge 1 commit into
mainfrom
cover-tiny-r1-distill-in-sft-train

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Sep 11, 2026

Copy link
Copy Markdown
Member

trl-internal-testing/tiny-Qwen2ForCausalLM-R1-Distill is used in three places, all in tests/test_chat_template_utils.py, and all through AutoTokenizer. Nothing in the suite loads its config or weights.

That is how #7135 came to align this model's vocab_size, bos_token_id, eos_token_id, max_position_embeddings and max_window_layers against fields no test reads. The MODEL_REVISIONS run before that merge did fire, since the tokenizer loads are patched too, but it could only confirm the tokenizer and chat template, never the config the PR actually changed.

Adding the model to test_train closes that: SFTTrainer loads it from the id, so config and weights are read, and a training step runs. It is the same coverage that made the FalconMamba check in #7139 meaningful.

Changes

  • Add tiny-Qwen2ForCausalLM-R1-Distill to the test_train model list

Note

Low Risk
Test-only change; no production code paths modified.

Overview
Adds trl-internal-testing/tiny-Qwen2ForCausalLM-R1-Distill to the parametrized test_train model list in test_sft_trainer.py, so CI runs the same SFTTrainer smoke test (load config/weights, train one step, assert loss and updated params) for that checkpoint.

This closes a coverage gap: the tiny R1-Distill model was only exercised via AutoTokenizer in chat-template tests, so changes to model config fields were not validated during training.

Reviewed by Cursor Bugbot for commit 025787f. Bugbot is set up for automated code reviews on this repo. Configure here.

`trl-internal-testing/tiny-Qwen2ForCausalLM-R1-Distill` was used in three
places, all in `tests/test_chat_template_utils.py`, and all through
`AutoTokenizer`. Nothing loaded its config or weights, so #7135 aligned its
`vocab_size`, token ids and position limits against fields no test reads.

`test_train` is where the other tiny models get that coverage, and it is what
gave the FalconMamba alignment in #7139 a real check.
@bot-ci-comment

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant