[Fix] Add name mapping in load_weights of nvidia/LocateAnything-3B (#41059)

This commit is contained in:
Jiacong Fang
2026-09-29 00:38:58 -07:00
committed by GitHub
parent dc1bd46802
commit bd78095030
2 changed files with 165 additions and 4 deletions
@@ -200,6 +200,12 @@ class LocateAnythingForConditionalGeneration(nn.Module):
)
if is_vision_weight:
# Map names from wqkv/wo -> attn.qkv_proj/attn.proj
# according to wrapped MoonVit's attention (VisionAttention)
# in python/sglang/srt/models/kimi_vl.py
name = name.replace("wqkv.", "attn.qkv_proj.").replace(
"wo.", "attn.proj."
)
if name.endswith(".bias") and name not in params_dict:
continue
if name not in params_dict: