Skip to content

Commit d73c942

Browse files
feat: qwen3 export to HF (#873)
Signed-off-by: Abdalgader Abubaker <[email protected]> Signed-off-by: Anna Shors <[email protected]> Co-authored-by: Abdalgader Abubaker <[email protected]>
1 parent e924d33 commit d73c942

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "3rdparty/NeMo"]
22
path = 3rdparty/NeMo-workspace/NeMo
33
url = https://github.com/NVIDIA/NeMo.git
4-
branch = zhiyul/yukih/prepare-refit-info
4+
branch = https://github.com/NVIDIA/NeMo/tree/ashors/rl-qwen3-export
55
shallow = true
66
[submodule "3rdparty/Megatron-LM"]
77
path = 3rdparty/Megatron-LM-workspace/Megatron-LM

3rdparty/NeMo-workspace/NeMo

Submodule NeMo updated from 8ddf438 to aaefedd

nemo_rl/models/megatron/community_import.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,14 @@ def export_model_from_megatron(
8585
from nemo.tron.converter.qwen import HFQwen2Exporter
8686

8787
exporter_cls = HFQwen2Exporter
88+
89+
elif hf_config.model_type in ("qwen3", "qwen3_moe"):
90+
from nemo.tron.converter.qwen import HFQwen3Exporter
91+
92+
exporter_cls = HFQwen3Exporter
8893
else:
8994
raise ValueError(
90-
f"Unknown model: {hf_model_name}. Currently, only Qwen2 and Llama are supported. "
95+
f"Unknown model: {hf_model_name}. Currently, only Qwen2, Qwen3 and Llama are supported. "
9196
"If you'd like to run with a different model, please raise an issue or consider adding your own converter."
9297
)
9398
print(f"Exporting model {hf_model_name} to {output_path}...")

0 commit comments

Comments
 (0)