-
Notifications
You must be signed in to change notification settings - Fork 420
Add OSWorld VLM training cookbook and integration #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jbarnes850
wants to merge
26
commits into
THUDM:main
Choose a base branch
from
jbarnes850:feature/osworld-vlm-cookbook
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,869
−18
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edff4f7 to
983cd40
Compare
Contributor
|
This looks awesome. Any chance you could share some training logs (e.g., reward curve) or a quick demo? |
- Add warning when CP_SIZE < 2 (VLM sequences can exceed 16K tokens) - Print training configuration summary for easier debugging - Helps diagnose OOM issues during backward pass with long sequences
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an OSWorld VLM training cookbook and reference integration for multi‑turn desktop automation in Slime. It is written for a reviewer who has not seen OSWorld before and explains how Slime connects to a VM‑backed GUI environment, why an HTTP bridge is required, and how training is run end‑to‑end without touching Slime core code.
OSWorld depends on desktop‑env (torch 2.5.1), while Slime’s training stack uses torch 2.9+, so the environment runs on the host and training runs in the container.
The cookbook makes that split explicit, proxies environment calls through a stateless HTTP server, and drives a multi‑turn VLM rollout loop that produces Qwen3‑VL multimodal tokens and aligned loss masks. Experience replay is used to avoid advantage collapse in sparse reward tasks, and reward shaping provides partial credit for valid actions, execution, and UI changes.
Reproducible artifacts are referenced to validate the pipeline without hunting for external dependencies: the task registry and replay buffer are in
Jarrodbarnes/osworld-union-v1, the SFT warmup checkpoint isJarrodbarnes/osworld-vlm-sft-step25, and the GSPO checkpoint isJarrodbarnes/osworld-vlm-gspo-step25. Metrics for the training runs are tracked in W&B atjbarnes850-near-protocol/osworld-grpo.The README documents the OSWorld subset used for training (Ubuntu only), how to launch the host VM, how the HTTP bridge is wired, and how to run training. Verification was done by running pre‑commit and compiling the example module.
This PR keeps all code confined to
examples/osworld/and does not modify Slime core paths.