faxenoff commited on
Commit
1fa340b
·
verified ·
1 Parent(s): 295325a

compiled artefacts from mac_arm64 (cpu)

Browse files
.gitattributes CHANGED
@@ -75,3 +75,5 @@ code-daemon-relation-v1-s_win_x64_trt11.3_sm_89.engine filter=lfs diff=lfs merge
75
  code-daemon-relation-v1-l_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
76
  code-daemon-relation-v1-m_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
77
  code-daemon-relation-v1-s_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
 
 
 
75
  code-daemon-relation-v1-l_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
76
  code-daemon-relation-v1-m_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
77
  code-daemon-relation-v1-s_win_x64_trt11.3_sm_86.engine filter=lfs diff=lfs merge=lfs -text
78
+ coreml_ane/embed.mlpackage/Data/com.apple.CoreML/model.mlmodel filter=lfs diff=lfs merge=lfs -text
79
+ coreml_ane/embed.mlpackage/Data/com.apple.CoreML/weights/weight.bin filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -288,6 +288,32 @@ lossy, and FP16 costs nothing on any GPU that can run it.
288
 
289
  ---
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  ## 8. License & attribution
292
 
293
  Released **MIT**.
 
288
 
289
  ---
290
 
291
+ ## Apple Neural Engine (Core ML)
292
+
293
+ `coreml_ane/embed.mlpackage/` is a Core ML **multifunction** package that runs this
294
+ relation cross-encoder on the Apple Neural Engine. It is a bundle, not a file — four
295
+ entries (`Manifest.json`, `shapes.json`, `Data/com.apple.CoreML/model.mlmodel`,
296
+ `Data/com.apple.CoreML/weights/weight.bin`) that must keep their relative paths.
297
+
298
+ **One compiled function per shape**, named `b<batch>_s<seq>`: `b16 s64`, `b16 s128`, `b16 s256`.
299
+ Fixed shapes are not a simplification. `ct.EnumeratedShapes` converts and runs, and
300
+ measures 233 emb/s against 2 873 on the same encoder, because the dynamic ops it
301
+ injects push the graph off the Neural Engine. `shapes.json` lists what was compiled,
302
+ so a caller can ask instead of assuming.
303
+
304
+ Measured on an M4 through the daemon's Core ML wrapper, batch 16: 1 909 rows/s at `s64`, 829
305
+ at `s128`, 275 at `s256` — a 4.5x spread per row, which is why the daemon routes each window
306
+ to the shortest function that covers it rather than padding the whole call to the longest.
307
+
308
+ Weights are fp16. The package is built from the MLX safetensors beside it, so a model
309
+ is ANE-ready exactly when it is MLX-ready — there is no second set of source weights.
310
+ Load it with `MLComputeUnits.cpuAndNeuralEngine`: plain `.all` lets Core ML place the
311
+ graph on the GPU instead, which measured 809 emb/s against the ANE's 2 873.
312
+
313
+ A shape the package does not carry is not an error — the caller is expected to fall
314
+ back to the MLX graph, which takes any shape. That is what makes the fixed-shape
315
+ package safe to ship alongside `model_gpu_mlx*/` rather than instead of it.
316
+
317
  ## 8. License & attribution
318
 
319
  Released **MIT**.
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:f49c48f67859a4799f0868712d8a43d33865edf37941cceec9e9af2c24571eb1
3
+ size 370816
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:eed611e7e846e7327434b5dd1fb280b46d85aee6df68b15cc389c47e26a613a0
3
+ size 235007680
coreml_ane/embed.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "93453F0B-3E1B-48CE-81BD-0771EBBF3064": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "EE3A9E1A-0768-4070-A54B-A326624BF892": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "93453F0B-3E1B-48CE-81BD-0771EBBF3064"
18
+ }
coreml_ane/embed.mlpackage/shapes.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "head": "entity_pool",
3
+ "output_dim": 4,
4
+ "per_token": false,
5
+ "shapes": [
6
+ {
7
+ "batch": 16,
8
+ "seq": 64,
9
+ "function": "b16_s64"
10
+ },
11
+ {
12
+ "batch": 16,
13
+ "seq": 128,
14
+ "function": "b16_s128"
15
+ },
16
+ {
17
+ "batch": 16,
18
+ "seq": 256,
19
+ "function": "b16_s256"
20
+ }
21
+ ]
22
+ }
manifest.json CHANGED
@@ -4,8 +4,7 @@
4
  "max_tokens": 256,
5
  "quantization": "fp16",
6
  "targets": [
7
- "openvino",
8
- "tensorrt"
9
  ],
10
  "runtime_tags": {
11
  "trt": "trt11.3",
@@ -13,6 +12,6 @@
13
  "tvm": "tvm0.25",
14
  "mlx_dir": "model_gpu_mlx0.32"
15
  },
16
- "compiled_at": "2026-09-17T21:54:35Z",
17
  "compiled_by": "models/_compile"
18
  }
 
4
  "max_tokens": 256,
5
  "quantization": "fp16",
6
  "targets": [
7
+ "openvino"
 
8
  ],
9
  "runtime_tags": {
10
  "trt": "trt11.3",
 
12
  "tvm": "tvm0.25",
13
  "mlx_dir": "model_gpu_mlx0.32"
14
  },
15
+ "compiled_at": "2026-09-24T02:28:50Z",
16
  "compiled_by": "models/_compile"
17
  }