Ben Graville commited on
Commit
50aa843
·
verified ·
1 Parent(s): fab587f

embeddinggemma-300m Core ML bundle (ANE encoder) — production embedding model

Browse files
3fa12f0b97b8afe23264f76800afe14af4615ca5/encoder.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a1c9388b1b67fce1271a45d02c569e573b7cf348d7c81a0b6874788a1faf51b
3
+ size 243
3fa12f0b97b8afe23264f76800afe14af4615ca5/encoder.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf423b8bb375f2cc20abe29e19c28c22684b773e8b17fd2ec58f41187d1bab7e
3
+ size 408
3fa12f0b97b8afe23264f76800afe14af4615ca5/encoder.mlmodelc/metadata.json ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "metadataOutputVersion" : "3.0",
4
+ "storagePrecision" : "Mixed (Float16, Int8)",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float16",
10
+ "formattedType" : "MultiArray (Float16 1 × 768)",
11
+ "shortDescription" : "",
12
+ "shape" : "[1, 768]",
13
+ "name" : "embedding",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "modelParameters" : [
18
+
19
+ ],
20
+ "specificationVersion" : 10,
21
+ "mlProgramOperationTypeHistogram" : {
22
+ "Ios18.softmax" : 24,
23
+ "Ios19.mul" : 487,
24
+ "Ios18.matmul" : 48,
25
+ "Ios19.maximum" : 2,
26
+ "Ios18.rsqrt" : 1,
27
+ "Ios19.squeeze" : 24,
28
+ "Ios16.reduceMax" : 1,
29
+ "Tile" : 49,
30
+ "Ios18.gather" : 1,
31
+ "Ios16.reduceSum" : 3,
32
+ "Ios19.add" : 123,
33
+ "Ios18.layerNorm" : 145,
34
+ "Ios19.concat" : 193,
35
+ "Ios19.constexprBlockwiseShiftScale" : 175,
36
+ "Ios19.transpose" : 216,
37
+ "Ios19.realDiv" : 2,
38
+ "Ios19.expandDims" : 99,
39
+ "Ios18.conv" : 170,
40
+ "Ios18.gelu" : 24,
41
+ "Ios19.split" : 193,
42
+ "Ios19.sub" : 1,
43
+ "Ios19.greaterEqual" : 2,
44
+ "Ios19.select" : 2,
45
+ "Ios18.abs" : 1,
46
+ "Ios19.reshape" : 146
47
+ },
48
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
49
+ "isUpdatable" : "0",
50
+ "stateSchema" : [
51
+
52
+ ],
53
+ "availability" : {
54
+ "macOS" : "16.0",
55
+ "tvOS" : "19.0",
56
+ "visionOS" : "3.0",
57
+ "watchOS" : "12.0",
58
+ "iOS" : "19.0",
59
+ "macCatalyst" : "19.0"
60
+ },
61
+ "modelType" : {
62
+ "name" : "MLModelType_mlProgram"
63
+ },
64
+ "userDefinedMetadata" : {
65
+ "com.github.apple.coremltools.conversion_date" : "2026-04-23",
66
+ "com.github.apple.coremltools.source" : "torch==2.8.0",
67
+ "com.github.apple.coremltools.version" : "9.0",
68
+ "com.github.apple.coremltools.source_dialect" : "TorchScript"
69
+ },
70
+ "inputSchema" : [
71
+ {
72
+ "hasShapeFlexibility" : "0",
73
+ "isOptional" : "0",
74
+ "dataType" : "Int32",
75
+ "formattedType" : "MultiArray (Int32 1 × 128)",
76
+ "shortDescription" : "",
77
+ "shape" : "[1, 128]",
78
+ "name" : "input_ids",
79
+ "type" : "MultiArray"
80
+ },
81
+ {
82
+ "hasShapeFlexibility" : "0",
83
+ "isOptional" : "0",
84
+ "dataType" : "Float16",
85
+ "formattedType" : "MultiArray (Float16 1 × 128)",
86
+ "shortDescription" : "",
87
+ "shape" : "[1, 128]",
88
+ "name" : "attention_mask",
89
+ "type" : "MultiArray"
90
+ }
91
+ ],
92
+ "generatedClassName" : "encoder",
93
+ "method" : "predict"
94
+ }
95
+ ]
3fa12f0b97b8afe23264f76800afe14af4615ca5/encoder.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
3fa12f0b97b8afe23264f76800afe14af4615ca5/encoder.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f81f60eb283f2c1479100beb27bbadfa7efc4576c6511ca3d13751e7680e950e
3
+ size 308616576
3fa12f0b97b8afe23264f76800afe14af4615ca5/model_config.json ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "embeddinggemma-300m",
3
+ "architecture": "gemma3-embedding",
4
+ "tokenizer_repo": "google/embeddinggemma-300m",
5
+ "parts": {
6
+ "encoder": "encoder.mlpackage"
7
+ },
8
+ "io_contract": {
9
+ "inputs": {
10
+ "input_ids": {
11
+ "shape": [
12
+ 1,
13
+ 128
14
+ ],
15
+ "dtype": "int32"
16
+ },
17
+ "attention_mask": {
18
+ "shape": [
19
+ 1,
20
+ 128
21
+ ],
22
+ "dtype": "fp16",
23
+ "doc": "1.0 for valid tokens, 0.0 for pad"
24
+ }
25
+ },
26
+ "outputs": {
27
+ "embedding": {
28
+ "shape": [
29
+ 1,
30
+ 768
31
+ ],
32
+ "dtype": "fp16",
33
+ "doc": "L2-normalized; Matryoshka-truncate the last dim"
34
+ }
35
+ }
36
+ },
37
+ "hidden_size": 768,
38
+ "num_hidden_layers": 24,
39
+ "num_attention_heads": 3,
40
+ "num_key_value_heads": 1,
41
+ "head_dim": 256,
42
+ "intermediate_size": 1152,
43
+ "vocab_size": 262144,
44
+ "max_seq_len": 128,
45
+ "sliding_window": 512,
46
+ "sliding_window_pattern": 6,
47
+ "layer_types": [
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "full_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "sliding_attention",
58
+ "sliding_attention",
59
+ "full_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "sliding_attention",
70
+ "sliding_attention",
71
+ "full_attention"
72
+ ],
73
+ "rms_norm_eps": 1e-06,
74
+ "rope_theta_global": 1000000.0,
75
+ "rope_theta_local": 10000.0,
76
+ "embed_dim": 768,
77
+ "dense_intermediate_dim": 3072,
78
+ "pooling": "mean",
79
+ "normalize": "l2",
80
+ "matryoshka_dims": [
81
+ 768,
82
+ 512,
83
+ 256,
84
+ 128
85
+ ],
86
+ "task_prefixes": {
87
+ "retrieval_query": "task: search result | query: ",
88
+ "retrieval_document": "title: none | text: ",
89
+ "classification": "task: classification | query: ",
90
+ "clustering": "task: clustering | query: ",
91
+ "similarity": "task: sentence similarity | query: ",
92
+ "code_retrieval": "task: code retrieval | query: ",
93
+ "question_answering": "task: question answering | query: ",
94
+ "fact_verification": "task: fact checking | query: "
95
+ },
96
+ "quantization": "int8",
97
+ "compute_units": "CPU_AND_NE"
98
+ }