Skip to content

Update doc and fix bugs#84

Merged
tastelikefeet merged 13 commits intomodelscope:mainfrom
tastelikefeet:fix/0227-4
Feb 28, 2026
Merged

Update doc and fix bugs#84
tastelikefeet merged 13 commits intomodelscope:mainfrom
tastelikefeet:fix/0227-4

Conversation

@tastelikefeet
Copy link
Copy Markdown
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Write the detail information belongs to this PR.

Experiment results

Paste your experiment result here(if needed).

@tastelikefeet tastelikefeet changed the title Fix/0227 4 Update doc and fix bugs Feb 28, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request systematically updates model identifiers in various examples and documentation to reflect newer Qwen3 and Qwen3.5 models, ensuring that users are guided towards the latest available resources. Concurrently, it significantly enhances the project's documentation by providing comprehensive usage patterns for different training scenarios and clarifies API integration. Minor bug fixes related to null checks in utility functions also contribute to the overall stability and user experience.

Highlights

  • Model ID Updates: Updated numerous model references across example scripts and documentation from older Qwen2.5 models to newer Qwen3 and Qwen3.5 models (e.g., Qwen3-4B, Qwen3.5-35B-A3B).
  • Documentation Enhancements: Expanded the English and Chinese READMEs and Quick Start guides with detailed usage patterns, including examples for partial component usage, single GPU, torchrun, Ray training, and remote training. Also updated the supported model lists.
  • Codebase Refinements: Removed an outdated Megatron example script (cookbook/megatron/qwen3_5.py) and introduced null checks in core utility functions (src/twinkle/infra/__init__.py, src/twinkle/processor/base.py, src/twinkle/utils/framework.py) for improved robustness.
  • API Example Clarifications: Replaced hardcoded base_url and api_key with generic placeholders in Tinker API examples and standardized the SelfCognitionProcessor team name to 'ModelScope Team' in various documentation and code snippets.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • README.md
    • Added introductory text for sample code capabilities.
    • Updated base_model from Qwen2.5-7B-Instruct to Qwen3-4B in the Ray training example.
    • Replaced base_url and api_key with placeholders and updated SelfCognitionProcessor team name in the Tinker API example.
  • README_ZH.md
    • Added introductory text for sample code capabilities.
    • Updated changelog entry for initial release to include Tinker API compatibility.
    • Updated note about serverless training service to clarify Tinker API compatibility and future plans.
    • Updated base_model from Qwen2.5-7B-Instruct to Qwen3-4B in the Ray training example.
    • Updated section title for Tinker API.
    • Replaced base_url and api_key with placeholders and updated SelfCognitionProcessor team name in the Tinker API example.
  • cookbook/megatron/qwen3_5.py
    • Removed the file.
  • cookbook/megatron/tp.py
    • Updated model_id from Qwen2.5-7B-Instruct to Qwen3-4B in both eval and train functions.
  • cookbook/megatron/tp_moe.py
    • Updated model_id from Qwen3-30B-A3B-Instruct-2507 to Qwen3.5-35B-A3B in both eval and train functions.
  • cookbook/ray/single_controller.py
    • Updated model_id from Qwen2.5-7B-Instruct to Qwen3.5-35B-A3B in eval function.
    • Updated model_id from Qwen2.5-7B-Instruct to Qwen3-4B in train function.
  • cookbook/rl/grpo.py
    • Updated MODEL_ID default value from Qwen2.5-3B-Instruct to Qwen3-4B.
  • cookbook/transformers/fsdp2.py
    • Updated model_id from Qwen2.5-7B-Instruct to Qwen3-4B in both eval and train functions.
  • cookbook/transformers/sp_fsdp_dense.py
    • Updated MODEL_ID from Qwen2.5-7B-Instruct to Qwen3-4B.
  • docs/source_en/Components/Advantage/GRPOAdvantage.md
    • Updated model_id for actor and sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Advantage/RLOOAdvantage.md
    • Changed section title from "Complete Training Example" to "Training Example".
    • Updated model_id for actor and sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
    • Added dataloader = ... placeholder.
  • docs/source_en/Components/Data Format/Sampling.md
    • Updated model_id for sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Dataset/Dataset.md
    • Updated model_id in set_template example from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Model/MegatronModel.md
    • Updated model_id for MegatronModel from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Model/TransformersModel.md
    • Updated model_id for TransformersModel from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Reward/Reward.md
    • Updated model_id for sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Sampler/TorchSampler.md
    • Updated model_id for TorchSampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_en/Components/Sampler/vLLMSampler.md
    • Updated model_id for vLLMSampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B in multiple examples.
  • docs/source_en/Usage Guide/Quick-Start.md
    • Added a new "Usage Patterns" section with examples for partial components, single GPU, torchrun, Ray training, and remote training.
    • Updated model IDs in various examples within the new sections to Qwen3-4B or Qwen3.5-35B-A3B.
    • Updated the "Supported Large Language Models List" table to include Qwen3-4B and Qwen3.5-35B-A3B and adjusted formatting.
  • docs/source_en/Usage Guide/Server and Client/Tinker-Compatible-Client.md
    • Updated SelfCognitionProcessor team name from 'twinkle team' to 'ModelScope Team'.
  • docs/source_en/Usage Guide/Server and Client/Twinkle-Client.md
    • Updated SelfCognitionProcessor team name from 'twinkle team' to 'ModelScope Team'.
  • docs/source_en/Usage Guide/Train-as-a-Service.md
    • Added a sample code block for using the TaaS training service, updating SelfCognitionProcessor team name.
  • docs/source_zh/使用指引/快速开始.md
    • Added a new "使用模式" section with examples for partial components, single GPU, torchrun, Ray training, and remote training.
    • Updated model IDs in various examples within the new sections to Qwen3-4B or Qwen3.5-35B-A3B.
    • Updated the "Twinkle✨ 模块化生态系统" table.
  • docs/source_zh/使用指引/训练服务.md
    • Added a sample code block for using the TaaS training service, updating SelfCognitionProcessor team name.
  • docs/source_zh/组件/优势/GRPOAdvantage.md
    • Updated model_id for actor and sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/优势/RLOOAdvantage.md
    • Updated model_id for actor and sampler from Qwen2.5-7B-Instruct to Qwen3-4B.
  • docs/source_zh/组件/奖励/Reward.md
    • Updated model_id for sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/数据格式/Sampling.md
    • Updated model_id for sampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/数据集/Dataset.md
    • Updated model_id in set_template example from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/模型/MegatronModel.md
    • Updated model_id for MegatronModel from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/模型/TransformersModel.md
    • Updated model_id for TransformersModel from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/采样器/TorchSampler.md
    • Updated model_id for TorchSampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B.
  • docs/source_zh/组件/采样器/vLLMSampler.md
    • Updated model_id for vLLMSampler from Qwen2.5-7B-Instruct to ms://Qwen/Qwen3-4B in multiple examples.
  • src/twinkle/infra/init.py
    • Added a null check for device_group in get_device_placement.
  • src/twinkle/processor/base.py
    • Added a null check for self.device_mesh in split_cp.
  • src/twinkle/server/main.py
    • Updated default model-id for quick start command from Qwen2.5-7B-Instruct to Qwen3-4B.
  • src/twinkle/server/twinkle/sampler.py
    • Updated model_id example in docstring from Qwen2.5-7B-Instruct to Qwen3-4B.
  • src/twinkle/utils/framework.py
    • Removed unused import torch.
    • Added a null check for device_mesh in gather_object.
Activity
  • The pull request was created to address a bug fix and update documentation, as indicated by the PR type and description.
  • No specific comments or reviews have been provided in the context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily focuses on updating documentation, including adding extensive usage patterns and examples to the Quick Start guide. It also updates the model IDs used in various examples to newer versions and fixes potential NoneType errors by adding null checks in the infrastructure and processor code. My review found a minor inconsistency in a code example within the documentation, which I've flagged for correction to ensure clarity for users.

@tastelikefeet tastelikefeet merged commit 7178b06 into modelscope:main Feb 28, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants