modelscope / modelscope/ms-swift

Question about implementation of ThinkingModelTipsScheduler

Open
#8,065 1 comment 0 reactions 1 assignee View on GitHub

@hjh0119 is already working on this.

Since Feb 24, 2026.

bug stale
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:

  1. In run(), for round_output, we only keep the last thinking block, yet current_request.messages still contains thinking blocks from all previous rounds during inference. Should we make current_request.messages only retains the latest thinking as well?
    https://github.com/modelscope/ms-swift/blob/d9010ed937680bfb23520ab1e9c2ad85f826be4a/swift/rollout/multi_turn.py#L471-L472

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.