You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Ling-2.6-flash (model_type=bailing_hybrid, remote-code layout) can't be loaded: GPTQModel forces native transformers, which crashes. The remote-code tree would also miss the MLA projections. #4373
resolve_trust_remote_code(path, trust_remote_code=True) logs "overriding trust_remote_code=True to False" and returns False. The native load then fails:
fromtransformersimportAutoModelForCausalLMfromgptqmodel.utils.hfimportresolve_trust_remote_coderesolve_trust_remote_code("inclusionAI/Ling-2.6-flash", trust_remote_code=True) # -> FalseAutoModelForCausalLM.from_pretrained("inclusionAI/Ling-2.6-flash", trust_remote_code=False,
num_hidden_layers=1, device_map="cpu")
# RuntimeError: The size of tensor a (32) must match the size of tensor b (16) (_init_weights, inv_freq copy)
Tree gap on the remote-code path. Even if the override is fixed, BailingMoeQModel's attention branch declares only query_key_value:0 and dense:1. The real checkpoint has model.layers.N.attention.{q_a_proj, q_b_proj, kv_a_proj_with_mqa, kv_b_proj, g_proj}. None of these resolve to a spec, and layer_modules_strict=False, so they would silently stay BF16.
Expected
Respect an explicit trust_remote_code=True, or detect the layout from auto_map or the weight names, when a checkpoint ships remote code whose layout differs from the native one.
Found during an AI-assisted review (Claude Code, round 12) of def6e61; repros were run at that commit (A/B against 842d666 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Taking this. I'll investigate against current main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.
Activity
Qubitium commentedon Nov 16, 2026
Taking this. I'll investigate against current
main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.fix(models): honor Ling remote-code layout and declare MLA projections (
fix: native class for natively supported remote-code checkpoints; kee…