Repository navigation
Run Inkling 2 Mini text on MLX - #67
Merged
Merged
Conversation
Inkling2MlxRunner serves Inkling 2 Mini text through the Engine on one Apple Silicon GPU, following the CUDA runner's arithmetic. - Experts stay packed: the checkpoint's NVFP4/MXFP8 bytes are MLX nvfp4/mxfp8 weights, and a Metal kernel reproduces the CUDA activation quantizer. - 48 looped layer visits with depth mixes and message controllers. - Engine cache groups for global KV, sliding-window KV and convolution history; chunked prefill, prefix reuse and overlapped decode. - LiveStates is shared with the Qwen3.5 runner. - The inkling2 recipe gains text_only; the inkling2-mini-mlx preset uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Paged flash-decoding attention with relative bias, window bounds and the sink's log-sum-exp; banded and causal prefill attention. - Fused convolution, depth-mix, RMS norm, routing, expert activation and combine kernels, and a BF16 vocabulary GEMV with FP32 output. - Exactly dequantized per-expert FP32 GEMMs for prefill chunks of 512 or more tokens. - Kernel tests at Mini's widths, multi-page cache tests, a compile-stability test and an opt-in real-checkpoint test against the CUDA model on CPU. - README with validation, MMLU and benchmarks against llama.cpp; NOTICE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
My man! |
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.
Inkling 2 Mini text now runs on Apple Silicon through the Engine.
Inkling2MlxRunnerkeeps the checkpoint's NVFP4/MXFP8 experts packed, reproduces the CUDA activation quantizer, and serves paged global and sliding-window attention with prefix reuse and overlapped decode. The recipe gainstext_onlyso the MLX preset rejects images. DSpark speculation is not included, so that checklist step stays open for a follow-up, as do images.Checked against the CUDA package's model on CPU (only its kernels replaced): on the real checkpoint each visit's attention and experts match within 0.53% relative, with the same greedy tokens (opt-in test, plus ad hoc runs to 2,100 tokens). Kernel tests at Mini's widths match the CUDA CPU references; Engine tests cover byte-exact cache reads, attention against an unsliced reference, cached vs fresh and overlap vs sync parity, and no new kernel variants for unseen lengths or sampling values. MMLU-100: 86 correct.
M4 Max, 8K context: 35.6 / 60.6 / 97.6 / 129.6 / 140.1 tok/s at batch 1/2/4/8/16, about 1.1× to 1.58× llama.cpp (Q4_K_M converted from the same checkpoint); prefill 529–539 tok/s at 4–8K. Long-prompt prefill (316 tok/s at 32K) is the main follow-up.