Skip to content

fix(mirror): recognize Kimi K3 expert shards - #1028

Open
terrizoaguimor wants to merge 1 commit into
JustVugg:devfrom
terrizoaguimor:fix/k3-mirror-plan
Open

fix(mirror): recognize Kimi K3 expert shards#1028
terrizoaguimor wants to merge 1 commit into
JustVugg:devfrom
terrizoaguimor:fix/k3-mirror-plan

Conversation

@terrizoaguimor

Copy link
Copy Markdown
Contributor

Summary

  • teach the partial-mirror planner Kimi K3's block_sparse_moe expert naming scheme
  • count packed weights and scales for w1, w2, and w3 without double-counting
  • use w1.weight_packed as K3's replica anchor while preserving GLM's gate_proj.weight behavior
  • cover both K3 prefixes and reject near-match tensors that are not routed experts

Why

coli mirror plan currently recognizes only GLM-style mlp.experts.*.{gate,up,down}_proj.weight tensors. A Kimi K3 checkpoint therefore produces no usage-ranked shards even with valid .coli_usage history. This is the planner-only first step requested in #812; the K3 runtime still does not consume a mirror, and this PR intentionally does not close the issue.

Testing

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -v tests.test_mirror_plan
  • make check (473 Python tests passed, 59 skipped, plus the C suite)
  • git diff --check

Refs #812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant