[RL] Fix FP8 skip matching for trailing-dot prefixes (#26287)

This commit is contained in:
Ziang Li
2026-05-26 20:30:08 +00:00
committed by GitHub
parent 47617cc4df
commit 2b1e53c98d
3 changed files with 63 additions and 0 deletions
@@ -50,6 +50,8 @@ def _module_path_match(ignored: str, prefix: str) -> bool:
# match `mlp.gate_up_proj`. Needed for quant configs (e.g. Qwen3.6-FP8)
# whose `modules_to_not_convert` lists MoE-template names like `mlp.gate`
# that collide with fused dense MLP names by plain substring.
ignored = ignored.rstrip(".")
prefix = prefix.rstrip(".")
if ignored == prefix:
return True
if prefix.startswith(ignored + "."):