Skip to content

add new cookbook with qwen3.5#106

Merged
tastelikefeet merged 2 commits intomodelscope:mainfrom
tastelikefeet:feat/qwen-4b-cookbook
Mar 5, 2026
Merged

add new cookbook with qwen3.5#106
tastelikefeet merged 2 commits intomodelscope:mainfrom
tastelikefeet:feat/qwen-4b-cookbook

Conversation

@tastelikefeet
Copy link
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).

@gemini-code-assist
Copy link
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 significantly enhances the documentation by introducing a new, detailed guide for training the Qwen3.5-4B model with the Twinkle framework. The guide comprehensively covers different training paradigms, including local multi-GPU setups, advanced reinforcement learning using Ray, and remote client-server architectures. It aims to empower users to leverage Twinkle's 'one codebase, from local debugging to production deployment' philosophy by providing clear examples and strategic recommendations for various training scenarios.

Highlights

  • New Qwen3.5-4B Training Guide: A comprehensive guide has been added, demonstrating best practices for training the Qwen3.5-4B model using the Twinkle framework, covering various deployment scenarios.
  • Local Multi-GPU Training: The guide illustrates local training on 1-8 GPUs/NPUs, showcasing PyTorch native interfaces and parallel strategies like FSDP2 and DDP with detailed code examples.
  • Reinforcement Learning with Ray: Detailed examples of RL training using Ray mode are provided, specifically with GRPO, emphasizing model-sampler separation and efficient distributed coordination.
  • Remote Client-Server Training: The documentation introduces remote training capabilities via Twinkle Client (for fine-grained control) and Tinker Client (for simplicity and ecosystem compatibility), suitable for enterprise and cloud environments.
  • Training Mode Selection Guidance: A section is included to help users choose the most appropriate Twinkle training mode (local, distributed, client-server, or ModelScope TaaS) based on their specific needs and use cases.

🧠 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
  • docs/source_en/Usage Guide/Introduction-with-Qwen3.5.md
    • Added a new English documentation file detailing Qwen3.5-4B training best practices.
  • docs/source_en/index.rst
    • Updated the English documentation index to include the newly added Qwen3.5-4B training guide.
  • docs/source_zh/index.rst
    • Updated the Chinese documentation index to include the newly added Qwen3.5-4B training guide.
  • docs/source_zh/使用指引/Qwen3.5最佳实践.md
    • Added a new Chinese documentation file detailing Qwen3.5-4B training best practices.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@tastelikefeet tastelikefeet merged commit eb19152 into modelscope:main Mar 5, 2026
1 check passed
dataloader = DataLoader(dataset=dataset, batch_size=4)

# 配置模型
model = MultiLoraTransformersModel(model_id='ms://Qwen/Qwen3.5-4B')
Copy link
Collaborator

Choose a reason for hiding this comment

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

use_megatron = True 矛盾了

Copy link
Collaborator

Choose a reason for hiding this comment

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

client侧需要知道server中是否运行的是megatron吗,这个可以统一吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

感觉这个不应该client感知,这是一个需要优化的地方,是否使用一个单独的模型比较好

Copy link
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 introduces comprehensive documentation for Qwen3.5-4B training best practices, covering local multi-GPU training, RL training with Ray, and remote training using client-server architecture. The new guides are well-structured and include clear code examples for each scenario. The index.rst files have been correctly updated to integrate these new documents into the project's documentation. Overall, this is a valuable addition that enhances the usability and understanding of the Twinkle framework.

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.

4 participants