THUDM / THUDM/slime

[Question] Must GLM-5 be converted to dist format offline? (AutoBridge registry mismatch)

Open
#1,787 0 comments 0 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

Hi,

We are trying to train GLM-5 (DeepseekV32ForCausalLM) using --megatron-to-hf-mode bridge to load HF safetensors directly. However, it crashes with: ValueError: Model architecture 'DeepseekV32ForCausalLM' is not yet supported.

It seems slime_plugins/mbridge/deepseek_v32.py registers the bridge using its own @register_model, but model_provider.py relies strictly on Megatron's internal MegatronModelBridge.REGISTRY, causing a disconnect.

We temporarily bypassed this by monkey-patching it in model_provider.py:

from slime_plugins.mbridge.deepseek_v32 import DeepseekV32Bridge
MegatronModelBridge.register_bridge(
source="DeepseekV32ForCausalLM", target=GPTModel
)(DeepseekV32Bridge)

Is online bridge mode supposed to be supported for GLM-5, and this is just a missing registry wrapper?
Or is the official workflow to strictly use mbridge to convert HF weights to a Megatron distributed (dist) checkpoint offline, then pass it via --load to bypass AutoBridge altogether?

What I've Tried

mbridge

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 reproducing the DeepseekV32ForCausalLM error in model_provider.py, then compare the registration in slime_plugins/mbridge/deepseek_v32.py with MegatronModelBridge.REGISTRY and register_bridge. Determine whether online bridge loading is intended for GLM-5 or whether offline dist conversion is required; the issue is resolved when the supported workflow or missing registry integration is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.