From 9d6701d82576573512655d53a9d5c6e9d5b05746 Mon Sep 17 00:00:00 2001 From: Abdalgader Abubaker <136640907+abdalgader-a@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:15:45 +0400 Subject: [PATCH] add qwen3 to megatron conversion Signed-off-by: Abdalgader Abubaker <136640907+abdalgader-a@users.noreply.github.com> --- nemo_rl/models/megatron/community_import.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nemo_rl/models/megatron/community_import.py b/nemo_rl/models/megatron/community_import.py index fdaf2f3690..2f952dd7e9 100644 --- a/nemo_rl/models/megatron/community_import.py +++ b/nemo_rl/models/megatron/community_import.py @@ -85,9 +85,14 @@ def export_model_from_megatron( from nemo.tron.converter.qwen import HFQwen2Exporter exporter_cls = HFQwen2Exporter + + elif hf_config.model_type == "qwen3": + from nemo.tron.converter.qwen import HFQwen3Exporter + + exporter_cls = HFQwen3Exporter else: raise ValueError( - f"Unknown model: {hf_model_name}. Currently, only Qwen2 and Llama are supported. " + f"Unknown model: {hf_model_name}. Currently, only Qwen2, Qwen3 and Llama are supported. " "If you'd like to run with a different model, please raise an issue or consider adding your own converter." ) print(f"Exporting model {hf_model_name} to {output_path}...")