chore: bump mlx-swift-lm to pick up DSA stage 2 (lightning indexer) - #159
Merged
Conversation
Closes #139. mlx-swift-lm#61 implements the DeepSeek Sparse Attention lightning indexer for GLM-5.2/DeepSeek V3.2, restricting attention to the top index_topk cached positions past that threshold (stage 1 ran dense unconditionally). Includes a follow-up fix commit addressing a critical crash bug found in review (causal mask built from a KV cache's post-update offset instead of pre-update, crashing on any real generation past index_topk) plus maxKVSize support and a fail-loud fix for cache-type mismatches. No real-weights verification yet — the smallest glm_moe_dsa checkpoint is 308GB. First real run should use avlp12/GLM-5.2-Alis-MLX-Dynamic-3.5bpw with --stream-experts, per #111/#139.
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.
Summary
Closes #139. Bumps the
mlx-swift-lmsubmodule to pick up mlx-swift-lm#61 — the DSA "lightning indexer" implementation for GLM-5.2/DeepSeek V3.2, restricting attention to the topindex_topkcached positions once context grows past that threshold (stage 1 ran dense attention unconditionally).Includes a follow-up commit fixing a critical bug found in code review before merge: the causal mask was built from a KV cache's post-update
.offsetinstead of pre-update, crashing on any real generation pastindex_topk(every stage-2 test had usedcache: nil, which happened to hide this). Also addsmaxKVSizesupport and fails loudly on cache-type mismatches instead of silently discarding the cache.Test plan
mlx-swift-lmtest suite: 132/132 passing, including a new real-cache regression test, red-green verified against the reintroduced bug.glm_moe_dsacheckpoint is 308GB. First real run should useavlp12/GLM-5.2-Alis-MLX-Dynamic-3.5bpwwith--stream-experts.