fix: match qwen3-thinking double-newline in train_on_responses_only response pattern (#6926)

* fix: match qwen3-thinking chat template double-newline in response pattern

The Qwen3-thinking chat template generates `<think>\n\n` (double newline)
after the think tag, but `train_on_responses_only` was looking for
`<think>\n` (single newline).

`\n\n` is token 271 while `\n` is token 198 -- different tokens, so the
pattern match in `train_on_responses_only` fails, masking ALL tokens and
dropping 100% of training samples.

Update the response pattern from `<think>\n` to `<think>\n\n` to match
what the actual qwen3-thinking template generates.

Fixes #6919

* fix qwen3 thinking response marker

---------

Co-authored-by: Ayushman Paul <ayushman@HP>
Co-authored-by: Etherll <61019402+Etherll@users.noreply.github.com>
This commit is contained in:
Ayushman 2026-07-07 23:58:18 +05:30 committed by GitHub
commit 304b8eca7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -487,7 +487,7 @@ TEMPLATE_TO_RESPONSES_MAPPER = {
},
"qwen3-thinking": {
"instruction": "<|im_start|>user\n",
"response": "<|im_start|>assistant\n<think>\n",
"response": "<|im_start|>assistant\n<think>",
},
"qwen3": {
"instruction": "<|im_start|>user\n",