TiGa-RCE commited on
Commit
64bce88
·
verified ·
1 Parent(s): 980b1b3

Preserve Needle bfloat16 runtime behavior

Browse files
Files changed (4) hide show
  1. README.md +10 -6
  2. config.json +2 -1
  3. manifest.json +2 -1
  4. model.safetensors +2 -2
README.md CHANGED
@@ -1,7 +1,6 @@
1
  ---
2
  license: mit
3
  library_name: mlx
4
- base_model: Cactus-Compute/needle
5
  tags:
6
  - mlx
7
  - function-calling
@@ -12,10 +11,14 @@ tags:
12
 
13
  # Needle MLX
14
 
15
- An MLX safetensors conversion of
16
  [Cactus-Compute/needle](https://huggingface.co/Cactus-Compute/needle), a
17
  26M-parameter encoder-decoder function-calling model.
18
 
 
 
 
 
19
  ## What is included
20
 
21
  - `model.safetensors`: 31 converted tensors, 26,315,421 parameters.
@@ -40,15 +43,16 @@ dedicated adapter to the serving runtime.
40
  ## Conversion and verification
41
 
42
  The published `needle.pkl` checkpoint was read with a restricted NumPy-only
43
- pickle loader, converted directly to MLX safetensors, and checked
44
- tensor-for-tensor against the source.
45
 
46
  - Source SHA-256:
47
  `40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40`
48
  - Converted `model.safetensors` SHA-256:
49
  `7b9d5f0d6ddeb7fbb20f4e45f3f616919357e5d08b5778859fdb762a33d60dae`
50
- - Verification: 31/31 tensors equal the source; an MLX encoder-decoder smoke
51
- pass produced logits with shape `(1, 2, 8192)`.
 
52
 
53
  The converter source is available at
54
  [seeker-cyber-maker/needle-mlx-depicklinator](https://github.com/seeker-cyber-maker/needle-mlx-depicklinator).
 
1
  ---
2
  license: mit
3
  library_name: mlx
 
4
  tags:
5
  - mlx
6
  - function-calling
 
11
 
12
  # Needle MLX
13
 
14
+ An MLX safetensors format conversion of
15
  [Cactus-Compute/needle](https://huggingface.co/Cactus-Compute/needle), a
16
  26M-parameter encoder-decoder function-calling model.
17
 
18
+ This is not a fine-tune or a quantization. The published checkpoint is loaded
19
+ using Needle's declared `bfloat16` inference dtype, then stored as MLX
20
+ safetensors so it preserves the upstream runtime's executable values.
21
+
22
  ## What is included
23
 
24
  - `model.safetensors`: 31 converted tensors, 26,315,421 parameters.
 
43
  ## Conversion and verification
44
 
45
  The published `needle.pkl` checkpoint was read with a restricted NumPy-only
46
+ pickle loader, converted to MLX `bfloat16` safetensors, and checked
47
+ tensor-for-tensor after the same dtype cast used by Needle's upstream runtime.
48
 
49
  - Source SHA-256:
50
  `40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40`
51
  - Converted `model.safetensors` SHA-256:
52
  `7b9d5f0d6ddeb7fbb20f4e45f3f616919357e5d08b5778859fdb762a33d60dae`
53
+ - Verification: 31/31 tensors equal the source after Needle's `bfloat16`
54
+ runtime cast; an MLX encoder-decoder smoke pass produced logits with shape
55
+ `(1, 2, 8192)` and generated the upstream weather tool-call example.
56
 
57
  The converter source is available at
58
  [seeker-cyber-maker/needle-mlx-depicklinator](https://github.com/seeker-cyber-maker/needle-mlx-depicklinator).
config.json CHANGED
@@ -22,7 +22,8 @@
22
  "NeedleModel"
23
  ],
24
  "format": "mlx-safetensors",
25
- "format_version": 1,
 
26
  "eos_token_id": 1,
27
  "source_checkpoint": "needle.pkl",
28
  "source_sha256": "40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40"
 
22
  "NeedleModel"
23
  ],
24
  "format": "mlx-safetensors",
25
+ "format_version": 2,
26
+ "tensor_dtype": "bfloat16",
27
  "eos_token_id": 1,
28
  "source_checkpoint": "needle.pkl",
29
  "source_sha256": "40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40"
manifest.json CHANGED
@@ -1,8 +1,9 @@
1
  {
2
  "format": "needle-mlx",
3
- "format_version": 1,
4
  "tensor_count": 31,
5
  "parameter_count": 26315421,
 
6
  "source_sha256": "40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40",
7
  "source_checkpoint": "needle.pkl"
8
  }
 
1
  {
2
  "format": "needle-mlx",
3
+ "format_version": 2,
4
  "tensor_count": 31,
5
  "parameter_count": 26315421,
6
+ "tensor_dtype": "bfloat16",
7
  "source_sha256": "40a32e91d1d4197bf15ba559b74f6727c342dc8746918742fc7d8e2c1f18df40",
8
  "source_checkpoint": "needle.pkl"
9
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7b9d5f0d6ddeb7fbb20f4e45f3f616919357e5d08b5778859fdb762a33d60dae
3
- size 52634442
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8491dba478deb60e46e437714911e1db729a6463f6289505f99af472b6aac7bc
3
+ size 52634473