THUDM / THUDM/slime

[Question] Gemma 4 support via HF wrapping approach?

Open
#1,811 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Your Question

I'm interested in using Gemma 4 (dense 31B and 26B A4B MoE) with slime for RL training. I noticed SGLang already supports Gemma 4 (sgl-project/sglang#21952), so the rollout side should be covered.

For the training side, I'm considering using the black-box HF wrapping approach described in docs/en/advanced/arch-support-beyond-megatron.md, following the Qwen3Next plugin as a template.

A few questions:

  1. Are there any existing plans to support Gemma 4?
  2. Is the HF wrapping approach the right path here, or would you recommend a different direction?
What I've Tried
  • I have read the example Qwen3Next support
Environment (if relevant)
  • slime version:
  • Python version:
  • PyTorch version:
  • CUDA/ROCm version:
  • GPU type and count:
  • OS:
Additional Context

No response

Pre-submission Checklist

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 by reading docs/en/advanced/arch-support-beyond-megatron.md and the existing Qwen3Next support example. Check how the proposed Hugging Face wrapping approach would apply to Gemma 4 and confirm the rollout-side assumptions against the referenced SGLang support. Done requires a maintainer decision on the recommended support path and scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.