Skip to content

Migrate tests to Qwen3.5 Think/NoThink fixtures#5821

Merged
qgallouedec merged 1 commit into
huggingface:mainfrom
aazizyan:migrate-qwen3.5-fixtures-to-think-nothink
May 22, 2026
Merged

Migrate tests to Qwen3.5 Think/NoThink fixtures#5821
qgallouedec merged 1 commit into
huggingface:mainfrom
aazizyan:migrate-qwen3.5-fixtures-to-think-nothink

Conversation

@aazizyan

@aazizyan aazizyan commented May 22, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Migrates the test suite from the legacy tiny-Qwen3_5ForConditionalGeneration fixture to the sibling -Think / -NoThink variants introduced in #5819.

Chat-template tests now exercise both variants (so the qwen3_5_4b_and_above.jinja template gains coverage it didn't have before — no fixture was sourced from the 4B checkpoint until now). Trainer/utility tests, which only need a tiny Qwen3.5 model and don't care about default thinking behavior, are mechanically pointed at -NoThink (matching the 0.8B source of the legacy fixture, so behavior is unchanged for those tests).

Note: legacy Hub repo can be deleted

After this PR merges, trl-internal-testing/tiny-Qwen3_5ForConditionalGeneration (the unsuffixed repo) will have no remaining references in the codebase and can be gracefully deleted by a maintainer if needed.

Changes

tests/test_chat_template_utils.py — three parametrize sites split into qwen35-nothink + qwen35-think pairs:

  • TestAddResponseSchema.test_add_response_schema_vlm
  • TestSupportsToolCalling.test_supports_tool_callingtransformers>=5.0.0 skipif mark duplicated onto the Think entry
  • TestParseResponse class-level parameterize

Mechanical rename tiny-Qwen3_5ForConditionalGenerationto tiny-Qwen3_5ForConditionalGeneration-NoThink at 8 sites:

  • tests/test_sft_trainer.py
  • tests/test_grpo_trainer.py
  • tests/test_rloo_trainer.py
  • tests/test_dpo_trainer.py
  • tests/test_data_utils.py

These trainer tests don't exercise thinking behavior — they need a small Qwen3.5 checkpoint. -NoThink preserves the original 0.8B sourcing, so test behavior is unchanged.

Part of #5471
Follows #5819

cc: @qgallouedec


Note

Low Risk
Low risk: changes are limited to test fixture/model IDs and parametrization, with no production code or training logic modifications.

Overview
Updates the test suite to stop using the legacy tiny-Qwen3_5ForConditionalGeneration fixture and instead target the new Qwen3.5 -NoThink and -Think variants.

Chat-template/response-parsing coverage is expanded to run against both Qwen3.5 variants (including duplicating transformers>=5.0.0 skip marks where needed), while trainer/data utility tests are mechanically switched to -NoThink to preserve prior default behavior.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1544c50. Configure here.

Comment thread tests/test_chat_template_utils.py

@qgallouedec qgallouedec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@HuggingFaceDocBuilderDev

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.

@qgallouedec qgallouedec merged commit 7877695 into huggingface:main May 22, 2026
13 checks passed
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.

3 participants