Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | ✅ | ✅ |
Expand Down
2 changes: 1 addition & 1 deletion deps/verifiers
Submodule verifiers updated 414 files
2 changes: 1 addition & 1 deletion docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions src/prime_rl/trainer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing KL mismatch table

Medium Severity

This PR adds custom-trainer support for Qwen3.8-27B, but it does not include the required mean KL mismatch table across 20 steps on the math environment with batch_size=64 (all entries < 0.015). That validation is required when introducing a new custom model so trainer and inference stay aligned.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: BugBot Instructions

Reviewed by Cursor Bugbot for commit 6e8a5af. Configure here.

_patch_qwen3_5_text_position_ids()
_patch_qwen3_5_moe_conversion_mapping()
_patch_qwen3_5_linear_attn_varlen()
Expand Down Expand Up @@ -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()
Expand Down