faxenoff commited on
Commit
0bd77df
·
verified ·
1 Parent(s): d9cd3a7

compiled artefacts from mac_arm64 (cpu)

Browse files
README.md CHANGED
@@ -709,6 +709,33 @@ normally.
709
 
710
  ---
711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
712
  ## License
713
 
714
  Released under the **MIT license**.
 
709
 
710
  ---
711
 
712
+ ## Apple Neural Engine (Core ML)
713
+
714
+ `coreml_ane/embed.mlpackage/` is a Core ML **multifunction** package that runs this
715
+ embedding on the Apple Neural Engine. It is a bundle, not a file — four
716
+ entries (`Manifest.json`, `shapes.json`, `Data/com.apple.CoreML/model.mlmodel`,
717
+ `Data/com.apple.CoreML/weights/weight.bin`) that must keep their relative paths.
718
+
719
+ **One compiled function per shape**, named `b<batch>_s<seq>`: `b96 s48`, `b128 s64`, `b128 s80`, `b256 s128`.
720
+ Fixed shapes are not a simplification. `ct.EnumeratedShapes` converts and runs, and
721
+ measures 233 emb/s against 2 873 on the same encoder, because the dynamic ops it
722
+ injects push the graph off the Neural Engine. `shapes.json` lists what was compiled,
723
+ so a caller can ask instead of assuming.
724
+
725
+ Measured on an M4 through the daemon's Core ML wrapper: 2 597 rows/s at `b96 s48`, 1 546 at
726
+ `b128 s64`, 1 106 at `b128 s80`, 594 at `b256 s128`. End to end on a real corpus the embed
727
+ phase runs 1 096 emb/s against MLX's 423 for the same vectors (cosine 0.99997 against the
728
+ torch F32 reference).
729
+
730
+ Weights are fp16. The package is built from the MLX safetensors beside it, so a model
731
+ is ANE-ready exactly when it is MLX-ready — there is no second set of source weights.
732
+ Load it with `MLComputeUnits.cpuAndNeuralEngine`: plain `.all` lets Core ML place the
733
+ graph on the GPU instead, which measured 809 emb/s against the ANE's 2 873.
734
+
735
+ A shape the package does not carry is not an error — the caller is expected to fall
736
+ back to the MLX graph, which takes any shape. That is what makes the fixed-shape
737
+ package safe to ship alongside `model_gpu_mlx*/` rather than instead of it.
738
+
739
  ## License
740
 
741
  Released under the **MIT license**.
code-daemon-embed-v1-l_ov2026.4_cpu_int8_b64_s80.xml CHANGED
The diff for this file is too large to render. See raw diff
 
code-daemon-embed-v1-m_ov2026.4_cpu_int8_b64_s64.xml CHANGED
The diff for this file is too large to render. See raw diff
 
code-daemon-embed-v1-s_ov2026.4_cpu_int8_b64_s48.xml CHANGED
The diff for this file is too large to render. See raw diff
 
code-daemon-embed-v1-xl_ov2026.4_cpu_int8_b64_s128.xml CHANGED
The diff for this file is too large to render. See raw diff
 
config.json CHANGED
@@ -20,18 +20,5 @@
20
  "transformers_version": "5.1.0",
21
  "type_vocab_size": 1,
22
  "use_cache": true,
23
- "vocab_size": 22739,
24
- "architectures": [
25
- "XLMRobertaModel"
26
- ],
27
- "ultracode": {
28
- "format": "raw-safetensors/1",
29
- "exported_from": "model.onnx",
30
- "onnx_sha256": "57bcfc6aed11ea239d01f2b124f2f948456f2284ad6e2c4744452509c9c25ca9",
31
- "head": "mean_proj_l2",
32
- "position_ids": "roberta",
33
- "pooling": "mean over attention_mask",
34
- "projection": "proj.weight, applied after pooling",
35
- "normalize": "l2"
36
- }
37
  }
 
20
  "transformers_version": "5.1.0",
21
  "type_vocab_size": 1,
22
  "use_cache": true,
23
+ "vocab_size": 22739
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
coreml_ane/embed.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e0d55be95cfdd236581e15174b823b0800c7ff3261ecf6c3afd99281d1eb320
3
+ size 188511
coreml_ane/embed.mlpackage/Data/com.apple.CoreML/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0be7d62c31e99dfe9a391af25b7a68e01f72e073e74bdd9aade557142ce4c066
3
+ size 93609984
coreml_ane/embed.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "36D22F73-0F7B-46E5-AF85-F37572EBA0A8": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "E0E2AA4E-6100-4400-A6BB-B0E7BEA8C872": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Specification",
13
+ "name": "model.mlmodel",
14
+ "path": "com.apple.CoreML/model.mlmodel"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "E0E2AA4E-6100-4400-A6BB-B0E7BEA8C872"
18
+ }
coreml_ane/embed.mlpackage/shapes.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "shapes": [
3
+ {
4
+ "batch": 96,
5
+ "seq": 48,
6
+ "function": "b96_s48"
7
+ },
8
+ {
9
+ "batch": 128,
10
+ "seq": 64,
11
+ "function": "b128_s64"
12
+ },
13
+ {
14
+ "batch": 128,
15
+ "seq": 80,
16
+ "function": "b128_s80"
17
+ },
18
+ {
19
+ "batch": 256,
20
+ "seq": 128,
21
+ "function": "b256_s128"
22
+ }
23
+ ],
24
+ "output_dim": 768
25
+ }
manifest.json CHANGED
@@ -5,7 +5,6 @@
5
  "quantization": "int8",
6
  "targets": [
7
  "openvino",
8
- "tensorrt",
9
  "tvm"
10
  ],
11
  "runtime_tags": {
@@ -14,6 +13,6 @@
14
  "tvm": "tvm0.25",
15
  "mlx_dir": "model_gpu_mlx0.32"
16
  },
17
- "compiled_at": "2026-09-17T21:53:22Z",
18
  "compiled_by": "models/_compile"
19
  }
 
5
  "quantization": "int8",
6
  "targets": [
7
  "openvino",
 
8
  "tvm"
9
  ],
10
  "runtime_tags": {
 
13
  "tvm": "tvm0.25",
14
  "mlx_dir": "model_gpu_mlx0.32"
15
  },
16
+ "compiled_at": "2026-09-24T02:26:13Z",
17
  "compiled_by": "models/_compile"
18
  }