THUDM / THUDM/slime

[Roadmap][VLM] Support VLM Multi-Turn

Open
#1,075 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

roadmap
Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

TODOs for VLM Multi-Turn Support

Generalize multi-turn support for both FSDP and Megatron.
All implementation should remain under examples/.

Single-turn reference: https://github.com/THUDM/slime/pull/501

Dataset

Rollout (--custom-generate-function-path)

Create a custom rollout function to support multi-turn interactions.

Multi-Turn Config
  • Add configs such as max_turns.
  • Add early-stop logic (e.g., stop on max tokens).
Loss Mask

(ref: https://github.com/THUDM/slime/blob/v0.2.0/slime/ray/rollout.py#L236).

Potential behavior:

  • Prepare tokens and loss_mask inside the custom rollout.
  • Initialize with empty tokens and empty loss_mask.
  • For each input turn:
    • Append input tokens to tokens.
    • Append 0s of equal length to loss_mask.
  • For each generated output:
    • Append output tokens to tokens.
    • Append 1s of equal length to loss_mask.

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.

Research direction

Start in examples/ and review the single-turn reference in PR 501, then compare the rollout behavior at slime/ray/rollout.py#L236. Check the OpenCUA dataset requirements and the custom rollout entry point. Done means multi-turn support works for both FSDP and Megatron with turn limits, early stopping, and input/output loss masks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.