Paris99 commited on
Commit
ef9ab92
·
verified ·
1 Parent(s): 8cfdaee

Rename the loop-gate tensors to MLX-VLM's Inkling 2 Mini names (values unchanged); card: works with stock mlx-vlm

Browse files
NOTICE CHANGED
@@ -5,7 +5,8 @@ Thinking Machines Lab, Inc., released under the Apache License, Version 2.0 (see
5
  governed by the Thinking Machines Model Acceptable Use Policy: https://thinkingmachines.ai/model-acceptable-use-policy/
6
 
7
  Changes made here: the weights were converted to MLX format with MLX-VLM plus Inkling 2 Mini support
8
- (https://github.com/internet-projects/inkling2-mlx, v0.1.0). In the 4-8bit build the routed experts keep their released
 
9
  NVFP4 (layers 0-19) and MXFP8 (layers 20-23) values, repacked to MLX's nvfp4 / mxfp8 formats, and all other weights are
10
  unchanged. In the 3bit, 2.5bit and 4bit builds the routed experts were dequantized from those values and re-quantized
11
  to affine integer formats, and the attention, embedding, output and vision linear layers were quantized as described in
 
5
  governed by the Thinking Machines Model Acceptable Use Policy: https://thinkingmachines.ai/model-acceptable-use-policy/
6
 
7
  Changes made here: the weights were converted to MLX format with MLX-VLM plus Inkling 2 Mini support
8
+ (https://github.com/internet-projects/inkling2-mlx, v0.1.0); on 21 November 2026 the loop-gate tensors were renamed
9
+ (values unchanged) to the names used by MLX-VLM's own Inkling 2 Mini support. In the 4-8bit build the routed experts keep their released
10
  NVFP4 (layers 0-19) and MXFP8 (layers 20-23) values, repacked to MLX's nvfp4 / mxfp8 formats, and all other weights are
11
  unchanged. In the 3bit, 2.5bit and 4bit builds the routed experts were dequantized from those values and re-quantized
12
  to affine integer formats, and the attention, embedding, output and vision linear layers were quantized as described in
README.md CHANGED
@@ -12,10 +12,13 @@ tags:
12
  - moe
13
  - dspark
14
  - speculative-decoding
 
15
  ---
16
 
17
  # Inkling 2 Mini for Apple Silicon (MLX, 2.5-bit, + DSpark)
18
 
 
 
19
  [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (revision `6e7c824`) for MLX on
20
  Apple Silicon, with its DSpark speculative-decoding draft bundled (`mtp.safetensors`) and its vision encoder included.
21
  The routed experts are re-quantized from their released NVFP4 / MXFP8 values to 2-bit (affine, group 64), with 3-bit in layers 0–1 and in layers 20–23 (the layers Thinking Machines kept at MXFP8). Attention, embeddings, the output layer and the vision encoder are 4-bit. Size: 10.8 GB plus the 0.64 GB draft.
@@ -29,7 +32,7 @@ Inkling 2 Mini is Thinking Machines' looped mixture-of-experts model: 26.4B para
29
  |---|---|---|---|---|---|
30
  | [netprojects/Inkling-2-Mini-MLX-4-8bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-4-8bit) (recommended) | 19.5 GB + 0.64 GB draft | 98.6% | 0.0018 | 47/50 | 27.8 GB |
31
  | [netprojects/Inkling-2-Mini-MLX-3bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-3bit) | 14.1 GB + 0.64 GB draft | 95.7% | 0.0421 | 48/50 | 21.2 GB |
32
- | [netprojects/Inkling-2-Mini-MLX-2.5bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-2.5bit) | 10.8 GB + 0.64 GB draft | 87.3% | 0.1904 | 45/50 | 18.2 GB |
33
  | [netprojects/Inkling-2-Mini-MLX-4bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-4bit) | 16.5 GB + 0.64 GB draft | 95.9% | 0.0286 | 47/50 | 23.5 GB |
34
 
35
  "Thinking Machines' code" is their Transformers implementation of Inkling 2 Mini, run on the released weights; the
@@ -37,14 +40,23 @@ columns are explained under "What was checked".
37
 
38
  ## Install
39
 
40
- Inkling 2 Mini support is not in a released MLX-VLM yet. Install MLX-VLM with it from [internet-projects/inkling2-mlx](https://github.com/internet-projects/inkling2-mlx)
41
- (MLX-VLM plus Inkling 2 Mini support; Python 3.10 or newer):
 
 
 
 
 
 
 
42
 
43
  ```bash
44
- pip install "git+https://github.com/internet-projects/inkling2-mlx@v0.1.0" torch torchvision
45
  ```
46
 
47
- PyTorch and torchvision are only used on the CPU by the image processor.
 
 
48
 
49
  ## Use
50
 
@@ -119,11 +131,11 @@ harnesses and settings; a selection of their table):
119
 
120
  ## What was checked
121
 
122
- On a MacBook Pro M5 Max (128 GB), 21 November 2026, with MLX 0.32.4 and [inkling2-mlx](https://github.com/internet-projects/inkling2-mlx) v0.1.0.
123
 
124
  - **Against Thinking Machines' code.** Their Transformers implementation (pull request #51050) ran on the CPU with the
125
  released weights, on 12 short chat texts (488 answer positions). This build gave the same next token at
126
- 87.3% of positions (mean KL 0.1904), and its greedy answers to 3 prompts matched theirs for the first 4, 9, 4 of 24 tokens. Against our 4/8-bit build: 87.3% same next token, mean KL 0.1869.
127
  - **GSM8K, 50 fixed test questions** (reasoning `none`, greedy): 45/50.
128
  - **Tool calling** (reasoning `none`): an agent prompt with `bash` and `read` tools produced a well-formed call in Inkling's
129
  format, which `mlx_vlm.server` returns as OpenAI `tool_calls`.
 
12
  - moe
13
  - dspark
14
  - speculative-decoding
15
+ - mlx-vlm
16
  ---
17
 
18
  # Inkling 2 Mini for Apple Silicon (MLX, 2.5-bit, + DSpark)
19
 
20
+ ✅ Works with stock mlx-vlm (main now, next release) · OpenAI tool calls via [inkling2-mlx](https://github.com/internet-projects/inkling2-mlx)
21
+
22
  [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (revision `6e7c824`) for MLX on
23
  Apple Silicon, with its DSpark speculative-decoding draft bundled (`mtp.safetensors`) and its vision encoder included.
24
  The routed experts are re-quantized from their released NVFP4 / MXFP8 values to 2-bit (affine, group 64), with 3-bit in layers 0–1 and in layers 20–23 (the layers Thinking Machines kept at MXFP8). Attention, embeddings, the output layer and the vision encoder are 4-bit. Size: 10.8 GB plus the 0.64 GB draft.
 
32
  |---|---|---|---|---|---|
33
  | [netprojects/Inkling-2-Mini-MLX-4-8bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-4-8bit) (recommended) | 19.5 GB + 0.64 GB draft | 98.6% | 0.0018 | 47/50 | 27.8 GB |
34
  | [netprojects/Inkling-2-Mini-MLX-3bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-3bit) | 14.1 GB + 0.64 GB draft | 95.7% | 0.0421 | 48/50 | 21.2 GB |
35
+ | [netprojects/Inkling-2-Mini-MLX-2.5bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-2.5bit) | 10.8 GB + 0.64 GB draft | 87.5% | 0.1899 | 45/50 | 18.2 GB |
36
  | [netprojects/Inkling-2-Mini-MLX-4bit](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-4bit) | 16.5 GB + 0.64 GB draft | 95.9% | 0.0286 | 47/50 | 23.5 GB |
37
 
38
  "Thinking Machines' code" is their Transformers implementation of Inkling 2 Mini, run on the released weights; the
 
40
 
41
  ## Install
42
 
43
+ Inkling 2 Mini is supported in MLX-VLM itself since 21 November 2026 (not yet in a PyPI release). Use MLX-VLM from main
44
+ (Python 3.10 or newer):
45
+
46
+ ```bash
47
+ pip install "git+https://github.com/Neywa-Labs/mlx-vlm" torch torchvision
48
+ ```
49
+
50
+ or, to also get OpenAI `tool_calls` from `mlx_vlm.server`, [internet-projects/inkling2-mlx](https://github.com/internet-projects/inkling2-mlx) (the same MLX-VLM plus
51
+ Inkling's tool-call parser):
52
 
53
  ```bash
54
+ pip install "git+https://github.com/internet-projects/inkling2-mlx@v0.2.0" torch torchvision
55
  ```
56
 
57
+ PyTorch and torchvision are only used on the CPU by the image processor. On 21 November 2026 this repository's weight files
58
+ were updated to the tensor names MLX-VLM uses (a rename of the loop-gate tensors; the values are unchanged): if you
59
+ downloaded this build before, download it again.
60
 
61
  ## Use
62
 
 
131
 
132
  ## What was checked
133
 
134
+ On a MacBook Pro M5 Max (128 GB), 20–21 November 2026, with MLX 0.32.4. The comparison with Thinking Machines' code was re-run on 21 November with MLX-VLM main (`fd6404f`, as in [inkling2-mlx](https://github.com/internet-projects/inkling2-mlx) v0.2.0); the other checks and the speeds below were measured with our earlier Inkling code (inkling2-mlx v0.1.0) on the same weights.
135
 
136
  - **Against Thinking Machines' code.** Their Transformers implementation (pull request #51050) ran on the CPU with the
137
  released weights, on 12 short chat texts (488 answer positions). This build gave the same next token at
138
+ 87.5% of positions (mean KL 0.1899), and its greedy answers to 3 prompts matched theirs for the first 4, 9, 4 of 24 tokens. Against our 4/8-bit build: 87.3% same next token, mean KL 0.1869.
139
  - **GSM8K, 50 fixed test questions** (reasoning `none`, greedy): 45/50.
140
  - **Tool calling** (reasoning `none`): an agent prompt with `bash` and `read` tools produced a well-formed call in Inkling's
141
  format, which `mlx_vlm.server` returns as OpenAI `tool_calls`.
model-00001-of-00003.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec93025ea51ed33811e8a49822b7e5d53f6f1d4524a74a86d8f3bc858f92444c
3
- size 5337713512
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba9617d99384ac47ac2eaf4a9d88b5ffde6bde42b6194beed73f266157301b2d
3
+ size 5337713112
model-00002-of-00003.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f8a59a5263e752874a6e1781c774137bac9d6a5221ea074e2f4da45b557dafd4
3
- size 5368478152
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4849755f6f58efdd2028cc55c0824f66afbe1f55d6474f1a9e6ae222be36cc4
3
+ size 5368477890
model.safetensors.index.json CHANGED
The diff for this file is too large to render. See raw diff