modelscope / modelscope/ms-swift
Question about implementation of ThinkingModelTipsScheduler
@hjh0119 is already working on this.
Since Feb 24, 2026.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
I have a few questions regarding the ThinkingModelTipsScheduler implementation:
-
In
run(), forround_output, we only keep the last thinking block, yetcurrent_request.messagesstill contains thinking blocks from all previous rounds during inference. Should we makecurrent_request.messagesonly retains the latest thinking as well?
https://github.com/modelscope/ms-swift/blob/d9010ed937680bfb23520ab1e9c2ad85f826be4a/swift/rollout/multi_turn.py#L471-L472 -
In
_build_messages(), when no template is used, the appended element seems incorrect. Based on the format of messages, should it be:{'role': 'assistant', 'content': assistant_no_think}?
https://github.com/modelscope/ms-swift/blob/d9010ed937680bfb23520ab1e9c2ad85f826be4a/swift/rollout/multi_turn.py#L572-L575
Thanks for your help!
How to Reproduce / 如何复现
running the framework's script: examples/train/grpo/external/vllm_multi_turn.sh and check related variables.
Additional Information / 补充信息
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.