MaziyarPanahi commited on
Commit
17998c1
·
verified ·
1 Parent(s): 08ba779

Publish onnx-android artifact

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ model.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
Constant_657_attr__value ADDED
Binary file (65.6 kB). View file
 
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: token-classification
4
+ library_name: openmed
5
+ tags:
6
+ - openmed
7
+ - medical-nlp
8
+ ---
9
+
10
+ # OpenMed-NER-ProteinDetect-SnowMed-568M-v1-onnx-android
11
+
12
+ This model card is rendered from the OpenMed model manifest. Update `models.jsonl` and rerun the publish step instead of editing this file directly.
13
+
14
+ ## Manifest Summary
15
+
16
+ | Field | Value |
17
+ |---|---|
18
+ | Repository | `OpenMed/OpenMed-NER-ProteinDetect-SnowMed-568M-v1-onnx-android` |
19
+ | Family | NER |
20
+ | Task | token-classification |
21
+ | Languages | en |
22
+ | Tier | Not specified |
23
+ | Parameters | 568M (568,000,000) |
24
+ | Architecture | xlm-roberta |
25
+ | Base model | OpenMed/OpenMed-NER-ProteinDetect-SnowMed-568M |
26
+ | Formats | onnx-android, int8 |
27
+ | License | apache-2.0 |
28
+ | arXiv | [arXiv:2508.01630](https://arxiv.org/abs/2508.01630) |
29
+ | Reproducibility hash | `sha256:52980c11e54355be05351d881b8e8fd8f2ef8f99d2d2ebc0f5ee7cb86e67ee68` |
30
+ | Released | 2026-07-12 |
31
+
32
+ ## Benchmark
33
+
34
+ | Dataset | Micro F1 | Recall |
35
+ |---|---:|---:|
36
+ | Not reported | Not reported | Not reported |
37
+
38
+ ## Canonical Labels
39
+
40
+ `protein`, `protein_complex`, `protein_enum`, `protein_familiy_or_group`, `protein_variant`
41
+
42
+ ## Artifact Format
43
+
44
+ | Field | Value |
45
+ |---|---|
46
+ | Runtime artifacts | onnx-android |
47
+ | Quantization | int8 |
config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "transformers_version": "5.12.1",
3
+ "architectures": [
4
+ "XLMRobertaForTokenClassification"
5
+ ],
6
+ "output_hidden_states": false,
7
+ "return_dict": true,
8
+ "dtype": "bfloat16",
9
+ "chunk_size_feed_forward": 0,
10
+ "is_encoder_decoder": false,
11
+ "id2label": {
12
+ "0": "B-protein",
13
+ "1": "B-protein_complex",
14
+ "2": "B-protein_enum",
15
+ "3": "B-protein_familiy_or_group",
16
+ "4": "B-protein_variant",
17
+ "5": "I-protein",
18
+ "6": "I-protein_complex",
19
+ "7": "I-protein_enum",
20
+ "8": "I-protein_familiy_or_group",
21
+ "9": "I-protein_variant",
22
+ "10": "O"
23
+ },
24
+ "label2id": {
25
+ "B-protein": 0,
26
+ "B-protein_complex": 1,
27
+ "B-protein_enum": 2,
28
+ "B-protein_familiy_or_group": 3,
29
+ "B-protein_variant": 4,
30
+ "I-protein": 5,
31
+ "I-protein_complex": 6,
32
+ "I-protein_enum": 7,
33
+ "I-protein_familiy_or_group": 8,
34
+ "I-protein_variant": 9,
35
+ "O": 10
36
+ },
37
+ "problem_type": null,
38
+ "vocab_size": 250002,
39
+ "hidden_size": 1024,
40
+ "num_hidden_layers": 24,
41
+ "num_attention_heads": 16,
42
+ "intermediate_size": 4096,
43
+ "hidden_act": "gelu",
44
+ "hidden_dropout_prob": 0.2,
45
+ "attention_probs_dropout_prob": 0.2,
46
+ "max_position_embeddings": 8194,
47
+ "type_vocab_size": 1,
48
+ "initializer_range": 0.02,
49
+ "layer_norm_eps": 1e-07,
50
+ "pad_token_id": 1,
51
+ "bos_token_id": 0,
52
+ "eos_token_id": 2,
53
+ "use_cache": true,
54
+ "classifier_dropout": 0.2,
55
+ "is_decoder": false,
56
+ "add_cross_attention": false,
57
+ "tie_word_embeddings": true,
58
+ "_name_or_path": "OpenMed/OpenMed-NER-ProteinDetect-SnowMed-568M",
59
+ "matryoshka_dimensions": [
60
+ 256
61
+ ],
62
+ "model_type": "xlm-roberta",
63
+ "output_past": true,
64
+ "position_embedding_type": "absolute",
65
+ "output_attentions": false,
66
+ "max_sequence_length": 512
67
+ }
id2label.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "0": "B-protein",
3
+ "1": "B-protein_complex",
4
+ "2": "B-protein_enum",
5
+ "3": "B-protein_familiy_or_group",
6
+ "4": "B-protein_variant",
7
+ "5": "I-protein",
8
+ "6": "I-protein_complex",
9
+ "7": "I-protein_enum",
10
+ "8": "I-protein_familiy_or_group",
11
+ "9": "I-protein_variant",
12
+ "10": "O"
13
+ }
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91d46e6a4ecce8a64d03c6909f5b924ff9de31012a34dd03c4a73148276c7483
3
+ size 633271
model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1029ee5408de4e4649bd0c0a9a8e921acc6aca598ca6a4e6148750ba44518a71
3
+ size 2266865708
model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23d149e2a5fa465b3a9de14b6a29ee7a71a5b4e7c186b38eace3b27a39f66f43
3
+ size 1134233581
model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fc3e84263b50e65e7234180996df8b036bedb864d4548169446f89d91bcef9a
3
+ size 1361883438
openmed-onnx.json ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format": "openmed-onnx",
3
+ "format_version": 1,
4
+ "formats": [
5
+ "onnx-android",
6
+ "onnx-int8"
7
+ ],
8
+ "task": "token-classification",
9
+ "family": "xlm-roberta",
10
+ "source_model_id": "OpenMed/OpenMed-NER-ProteinDetect-SnowMed-568M",
11
+ "config_path": "config.json",
12
+ "label_map_path": "id2label.json",
13
+ "artifacts": [
14
+ {
15
+ "format": "onnx-android",
16
+ "path": "model.onnx",
17
+ "precision": "float32",
18
+ "metadata": {
19
+ "profile": "android",
20
+ "opset": 18,
21
+ "execution_providers": [
22
+ "NNAPI",
23
+ "XNNPACK"
24
+ ],
25
+ "inputs": [
26
+ {
27
+ "name": "input_ids",
28
+ "dtype": "int64",
29
+ "axes": [
30
+ "batch",
31
+ "sequence"
32
+ ],
33
+ "shape": [
34
+ {
35
+ "kind": "dynamic",
36
+ "name": "batch"
37
+ },
38
+ {
39
+ "kind": "dynamic",
40
+ "name": "sequence"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "attention_mask",
46
+ "dtype": "int64",
47
+ "axes": [
48
+ "batch",
49
+ "sequence"
50
+ ],
51
+ "shape": [
52
+ {
53
+ "kind": "dynamic",
54
+ "name": "batch"
55
+ },
56
+ {
57
+ "kind": "dynamic",
58
+ "name": "sequence"
59
+ }
60
+ ]
61
+ }
62
+ ],
63
+ "outputs": [
64
+ {
65
+ "name": "logits",
66
+ "dtype": "float32",
67
+ "axes": [
68
+ "batch",
69
+ "sequence",
70
+ "labels"
71
+ ],
72
+ "shape": [
73
+ {
74
+ "kind": "dynamic",
75
+ "name": "batch"
76
+ },
77
+ {
78
+ "kind": "dynamic",
79
+ "name": "sequence"
80
+ },
81
+ {
82
+ "kind": "static",
83
+ "value": 11
84
+ }
85
+ ]
86
+ }
87
+ ],
88
+ "operators": [
89
+ "Constant",
90
+ "Equal",
91
+ "Not",
92
+ "Cast",
93
+ "CumSum",
94
+ "Mul",
95
+ "Add",
96
+ "Shape",
97
+ "Gather",
98
+ "Unsqueeze",
99
+ "Concat",
100
+ "Reshape",
101
+ "ConstantOfShape",
102
+ "Where",
103
+ "Expand",
104
+ "GatherElements",
105
+ "LayerNormalization",
106
+ "Range",
107
+ "GreaterOrEqual",
108
+ "And",
109
+ "Flatten",
110
+ "MatMul",
111
+ "Transpose",
112
+ "Softmax",
113
+ "IsNaN",
114
+ "Div",
115
+ "Erf"
116
+ ],
117
+ "unsupported_ops": [
118
+ "CumSum",
119
+ "GreaterOrEqual",
120
+ "Flatten",
121
+ "IsNaN"
122
+ ],
123
+ "warnings": [
124
+ "CumSum is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
125
+ "GreaterOrEqual is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
126
+ "Flatten is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
127
+ "IsNaN is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set"
128
+ ]
129
+ }
130
+ },
131
+ {
132
+ "format": "onnx-android",
133
+ "path": "model_fp16.onnx",
134
+ "precision": "float16",
135
+ "metadata": {
136
+ "profile": "android",
137
+ "opset": 18,
138
+ "execution_providers": [
139
+ "NNAPI",
140
+ "XNNPACK"
141
+ ],
142
+ "inputs": [
143
+ {
144
+ "name": "input_ids",
145
+ "dtype": "int64",
146
+ "axes": [
147
+ "batch",
148
+ "sequence"
149
+ ],
150
+ "shape": [
151
+ {
152
+ "kind": "dynamic",
153
+ "name": "batch"
154
+ },
155
+ {
156
+ "kind": "dynamic",
157
+ "name": "sequence"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "name": "attention_mask",
163
+ "dtype": "int64",
164
+ "axes": [
165
+ "batch",
166
+ "sequence"
167
+ ],
168
+ "shape": [
169
+ {
170
+ "kind": "dynamic",
171
+ "name": "batch"
172
+ },
173
+ {
174
+ "kind": "dynamic",
175
+ "name": "sequence"
176
+ }
177
+ ]
178
+ }
179
+ ],
180
+ "outputs": [
181
+ {
182
+ "name": "logits",
183
+ "dtype": "float32",
184
+ "axes": [
185
+ "batch",
186
+ "sequence",
187
+ "labels"
188
+ ],
189
+ "shape": [
190
+ {
191
+ "kind": "dynamic",
192
+ "name": "batch"
193
+ },
194
+ {
195
+ "kind": "dynamic",
196
+ "name": "sequence"
197
+ },
198
+ {
199
+ "kind": "static",
200
+ "value": 11
201
+ }
202
+ ]
203
+ }
204
+ ],
205
+ "operators": [
206
+ "Constant",
207
+ "Equal",
208
+ "Not",
209
+ "Cast",
210
+ "CumSum",
211
+ "Mul",
212
+ "Add",
213
+ "Shape",
214
+ "Gather",
215
+ "Unsqueeze",
216
+ "Concat",
217
+ "Reshape",
218
+ "ConstantOfShape",
219
+ "Where",
220
+ "Expand",
221
+ "GatherElements",
222
+ "LayerNormalization",
223
+ "Range",
224
+ "GreaterOrEqual",
225
+ "And",
226
+ "Flatten",
227
+ "MatMul",
228
+ "Transpose",
229
+ "Softmax",
230
+ "IsNaN",
231
+ "Div",
232
+ "Erf"
233
+ ],
234
+ "unsupported_ops": [
235
+ "CumSum",
236
+ "GreaterOrEqual",
237
+ "Flatten",
238
+ "IsNaN"
239
+ ],
240
+ "warnings": [
241
+ "CumSum is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
242
+ "GreaterOrEqual is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
243
+ "Flatten is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
244
+ "IsNaN is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set"
245
+ ]
246
+ }
247
+ },
248
+ {
249
+ "format": "onnx-int8",
250
+ "path": "model_int8.onnx",
251
+ "precision": "int8",
252
+ "metadata": {
253
+ "format": "onnx-int8",
254
+ "quantization": {
255
+ "scheme": "dynamic",
256
+ "weight_type": "qint8",
257
+ "op_types": [
258
+ "MatMul",
259
+ "Gemm"
260
+ ],
261
+ "calibration": "none",
262
+ "target": "arm64-cpu",
263
+ "output": "model_int8.onnx"
264
+ },
265
+ "profile": "android",
266
+ "opset": 18,
267
+ "execution_providers": [
268
+ "NNAPI",
269
+ "XNNPACK"
270
+ ],
271
+ "inputs": [
272
+ {
273
+ "name": "input_ids",
274
+ "dtype": "int64",
275
+ "axes": [
276
+ "batch",
277
+ "sequence"
278
+ ],
279
+ "shape": [
280
+ {
281
+ "kind": "dynamic",
282
+ "name": "batch"
283
+ },
284
+ {
285
+ "kind": "dynamic",
286
+ "name": "sequence"
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "name": "attention_mask",
292
+ "dtype": "int64",
293
+ "axes": [
294
+ "batch",
295
+ "sequence"
296
+ ],
297
+ "shape": [
298
+ {
299
+ "kind": "dynamic",
300
+ "name": "batch"
301
+ },
302
+ {
303
+ "kind": "dynamic",
304
+ "name": "sequence"
305
+ }
306
+ ]
307
+ }
308
+ ],
309
+ "outputs": [
310
+ {
311
+ "name": "logits",
312
+ "dtype": "float32",
313
+ "axes": [
314
+ "batch",
315
+ "sequence",
316
+ "labels"
317
+ ],
318
+ "shape": [
319
+ {
320
+ "kind": "dynamic",
321
+ "name": "batch"
322
+ },
323
+ {
324
+ "kind": "dynamic",
325
+ "name": "sequence"
326
+ },
327
+ {
328
+ "kind": "static",
329
+ "value": 11
330
+ }
331
+ ]
332
+ }
333
+ ],
334
+ "operators": [
335
+ "Constant",
336
+ "Cast",
337
+ "Shape",
338
+ "Gather",
339
+ "Equal",
340
+ "ConstantOfShape",
341
+ "Flatten",
342
+ "Not",
343
+ "Unsqueeze",
344
+ "Concat",
345
+ "CumSum",
346
+ "Range",
347
+ "Reshape",
348
+ "Mul",
349
+ "Add",
350
+ "Where",
351
+ "Expand",
352
+ "GatherElements",
353
+ "LayerNormalization",
354
+ "DynamicQuantizeLinear",
355
+ "MatMulInteger",
356
+ "Transpose",
357
+ "GreaterOrEqual",
358
+ "MatMul",
359
+ "And",
360
+ "Softmax",
361
+ "IsNaN",
362
+ "Div",
363
+ "Erf"
364
+ ],
365
+ "unsupported_ops": [
366
+ "Flatten",
367
+ "CumSum",
368
+ "DynamicQuantizeLinear",
369
+ "MatMulInteger",
370
+ "GreaterOrEqual",
371
+ "IsNaN"
372
+ ],
373
+ "warnings": [
374
+ "Flatten is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
375
+ "CumSum is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
376
+ "DynamicQuantizeLinear is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
377
+ "MatMulInteger is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
378
+ "GreaterOrEqual is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set",
379
+ "IsNaN is not in the Android ONNX Runtime Mobile NNAPI/XNNPACK safe set"
380
+ ]
381
+ }
382
+ }
383
+ ],
384
+ "minimum_opset": 18,
385
+ "max_sequence_length": 512,
386
+ "dynamic_shapes": {
387
+ "batch_axis": "dynamic",
388
+ "sequence_axis": "dynamic",
389
+ "shape_buckets": {
390
+ "strategy": "next_configured_bucket_or_exact",
391
+ "axes": {
392
+ "input": [
393
+ "batch",
394
+ "sequence"
395
+ ],
396
+ "output": [
397
+ "batch",
398
+ "sequence"
399
+ ]
400
+ },
401
+ "buckets": [
402
+ 8,
403
+ 16,
404
+ 32,
405
+ 64,
406
+ 128,
407
+ 256,
408
+ 512,
409
+ 1024,
410
+ 2048
411
+ ],
412
+ "min_length": 8,
413
+ "max_length": 2048,
414
+ "overflow": "exact_length"
415
+ }
416
+ },
417
+ "optimization": {
418
+ "enabled": false,
419
+ "minimum_opset": 18
420
+ },
421
+ "validation": {},
422
+ "operator_fallbacks": [],
423
+ "tokenizer": {
424
+ "path": ".",
425
+ "files": [
426
+ "tokenizer.json",
427
+ "tokenizer_config.json"
428
+ ]
429
+ }
430
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ffb37461c391f096759f4a9bbbc329da0f36952f88bab061fcf84940c022e98
3
+ size 17082999
tokenizer_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "clean_up_tokenization_spaces": true,
6
+ "cls_token": "<s>",
7
+ "eos_token": "</s>",
8
+ "is_local": false,
9
+ "local_files_only": false,
10
+ "mask_token": "<mask>",
11
+ "max_length": 512,
12
+ "model_max_length": 8192,
13
+ "pad_to_multiple_of": null,
14
+ "pad_token": "<pad>",
15
+ "pad_token_type_id": 0,
16
+ "padding_side": "right",
17
+ "sep_token": "</s>",
18
+ "stride": 0,
19
+ "tokenizer_class": "XLMRobertaTokenizer",
20
+ "truncation_side": "right",
21
+ "truncation_strategy": "longest_first",
22
+ "unk_token": "<unk>"
23
+ }