diff --git a/README.md b/README.md index 3f6ebf15dc..013deb8dc3 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ With `[model] impl = "auto"` (the default), the trainer selects that custom stac | GLM-5 (`glm_moe_dsa`) | `zai-org/GLM-5`, `zai-org/GLM-5-FP8` | yes | ✅ | ✅ | | Qwen3 MoE (`qwen3_moe`) | `Qwen/Qwen3-30B-A3B`, … | yes | ✅ | ✅ | | Qwen3.5 MoE (`qwen3_5_moe`) | `Qwen/Qwen3.5-35B-A3B`, … | yes | ✅ | ✅ | -| Qwen3 / Qwen3.5 VLMs | see [advanced.md](docs/advanced.md#multimodal-training) (`qwen3_vl`, `qwen3_5`, `qwen3_5_moe`) | MoE only on MoE VLMs | MoE only | ❌ | +| Qwen3 / Qwen3.5 / Qwen3.8 VLMs | see [advanced.md](docs/advanced.md#multimodal-training) (`qwen3_vl`, `qwen3_5`, `qwen3_5_moe`) — Qwen3.8-27B reuses `qwen3_5` | MoE only on MoE VLMs | MoE only | ❌ | | Poolside Laguna (`laguna`) | `poolside/Laguna-XS.2` | yes | ✅ | ✅ | | MiniMax M2 (`minimax_m2`) | `MiniMax/MiniMax-M2` | yes | ✅ | ✅ | | Nemotron H (`nemotron_h`) | `nvidia/Nemotron-3-Nano-30B-A3B`, `nvidia/Nemotron-3-Super-120B-A12B`, … | yes | ✅ | ✅ | diff --git a/deps/renderers b/deps/renderers index bdb96b0c84..5520d1ece7 160000 --- a/deps/renderers +++ b/deps/renderers @@ -1 +1 @@ -Subproject commit bdb96b0c84a307e2b71c6a366c9d718c3ac7fe78 +Subproject commit 5520d1ece742ee25b50b97a579dbee70b1447c3f diff --git a/deps/verifiers b/deps/verifiers index 1f457da17a..2c93838a78 160000 --- a/deps/verifiers +++ b/deps/verifiers @@ -1 +1 @@ -Subproject commit 1f457da17a0408ef062f2c11576e67d2cd66126a +Subproject commit 2c93838a782688c01ccbc5b4a292294bb4fa704f diff --git a/docs/advanced.md b/docs/advanced.md index c4c1ba9b9c..7f46da8e43 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -72,7 +72,7 @@ The built-in VLM registry covers: | Family | `model_type` | Vision attr | LM attr | |---|---|---|---| -| Qwen3.5 | `qwen3_5` | `model.visual` | `model.language_model` | +| Qwen3.5 / Qwen3.8 (dense) | `qwen3_5` | `model.visual` | `model.language_model` | | Qwen3.5-MoE | `qwen3_5_moe` | `model.visual` | `model.language_model` | ### Enabling VLM Mode diff --git a/src/prime_rl/trainer/model.py b/src/prime_rl/trainer/model.py index 1b564d515b..20bad4bd69 100644 --- a/src/prime_rl/trainer/model.py +++ b/src/prime_rl/trainer/model.py @@ -488,7 +488,11 @@ def get_model( is_vlm_training = config.vlm is not None - if "Qwen3.5" in config.name or "qwen3_5" in config.name.lower(): + if ( + "Qwen3.5" in config.name + or "Qwen3.8" in config.name + or "qwen3_5" in config.name.lower() + ): _patch_qwen3_5_text_position_ids() _patch_qwen3_5_moe_conversion_mapping() _patch_qwen3_5_linear_attn_varlen() @@ -523,8 +527,10 @@ def get_model( _hub_kernels._kernels_enabled = True - # Fallback Qwen3.5 patch detection from loaded config model_type - if getattr(model_config, "model_type", "").startswith("qwen3_5_moe"): + # Fallback Qwen3.5 patch detection from loaded config model_type. Covers + # renamed Qwen3.5 / Qwen3.8 checkpoints (``qwen3_5``, ``qwen3_5_text``, + # ``qwen3_5_moe``) whose name_or_path misses the name-based gate above. + if getattr(model_config, "model_type", "").startswith("qwen3_5"): _patch_qwen3_5_text_position_ids() _patch_qwen3_5_moe_conversion_mapping() _patch_qwen3_5_linear_attn_varlen()