feat: bump mlx-swift-lm for glm_moe_dsa (GLM-5.2) support - #138
Merged
Conversation
Points at bfc2462, which brings two things: - SharpAI/mlx-swift-lm#48 — glm_moe_dsa / deepseek_v3_2 load and run with dense attention (stage 1 of #111). GLM-5.2 is DeepSeek V3.2, whose indexer is inert below index_topk (2048), so output is exact for the first 2048 positions of context and diverges beyond them. That is enough to exercise --stream-experts against the 308GB checkpoint, which is what the issue actually asks for. - SharpAI/mlx-swift-lm#47 — the all-KV-shared assistant regression tests, which had not been picked up by a bump yet. #48 also generalises a latent trap in DeepseekV3.sanitize, which dropped `model.layers.61` by string literal. That number is just numHiddenLayers; on GLM-5.2's 78 layers it would have deleted a real layer while keeping the MTP block. Verified past the registry: pointing the binary at a glm_moe_dsa config constructs the model and fails only on absent weights — Key model.embed_tokens.weight not found in DeepseekV32Model.DeepseekV3ModelInner.Embedding so the architecture is reachable end to end, not merely registered. No real weights have been run: the smallest glm_moe_dsa checkpoint is 308GB. Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
solderzzc
force-pushed
the
feat/glm-moe-dsa-submodule-bump
branch
from
August 12, 2026 04:30
e1a0533 to
a7cf64a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the submodule to
bfc2462, which brings GLM-5.2 support into SwiftLM. Closes stage 1 of #111.What lands
mlx-swift-lm#48 —
glm_moe_dsa/deepseek_v3_2load and run with dense attention. GLM-5.2 turns out to be DeepSeek V3.2 (in mlx-lm its model class is a bare subclass), and V3.2's sparse indexer is inert belowindex_topk:GLM-5.2 ships
index_topk: 2048, so this is numerically exact for the first 2048 positions and diverges beyond them — dense rather than top-2048 sparse. That is enough to exercise--stream-expertsagainst the 308 GB checkpoint, which is what Support for glm_moe_dsa architecture (GLM-5.2 DeepSeek Sparse Attention) #111 actually asks for. The indexer is stage 2.mlx-swift-lm#47 — the all-KV-shared assistant regression tests, which no bump had picked up yet.
#48 also generalises a latent trap in
DeepseekV3.sanitize, which droppedmodel.layers.61as a string literal. That number is justnumHiddenLayers; against GLM-5.2's 78 layers it would have deleted a real layer and kept the actual MTP block.Verification
Umbrella builds clean against the bump. More usefully, verified past the registry — pointing the binary at a
glm_moe_dsaconfig constructs the model and fails only on the absent weights:So the architecture is reachable end to end, not merely registered.
What is not verified
No real weights have been run. The smallest
glm_moe_dsacheckpoint is 308 GB, so everything upstream is covered by tiny random-init configs that establish shape, flow and weight handling — not numerics against the reference. The first person to run this on the real model should expect to find things these tests cannot see, and the SSD-streaming path at 308 GB with ~40 B active per token is separately uncharted.🤖 Generated with Claude Code