pieroot commited on
Commit
17f736e
·
verified ·
1 Parent(s): 118b101

Publish English priority-only Core ML artifact (FP16, logits-only)

Browse files
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - coreml
5
+ - laya
6
+ - decision-model
7
+ ---
8
+
9
+ # laya-priority-coreml (English, priority-only)
10
+
11
+ Core ML conversion of `convaiinnovations/laya` (English checkpoint, revision
12
+ `55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851`), restricted to a single fixed
13
+ binary `choice` question used for one purpose: deciding whether a to-do item
14
+ should be acted on now versus deferred. This is not a general-purpose export
15
+ of Laya — only the two-option priority decision graph is included, and only
16
+ `logits` (pre-temperature) is returned.
17
+
18
+ Weights © Convai Innovations, Apache-2.0. Conversion graph and Core ML export
19
+ by this repository's owner.
20
+
21
+ ## Known limitation — do not treat as validated for general use
22
+
23
+ Zero-shot measurement on a 48-item balanced English/Korean-translated fixture
24
+ (this checkpoint, priority-only question) scored 17/24 (70.8%) on English and
25
+ 15/24 (62.5%) on Korean text machine-translated to English, both below an
26
+ 80%-accuracy / 70%-recall gate. This artifact is shipped anyway at the
27
+ consuming application's explicit request, with rule-based fallback preserved
28
+ for degraded cases. Do not present its output as high-confidence.
29
+
30
+ ## Static IO contract
31
+
32
+ - Inputs (`int32`): `input_ids [1,512]`, `attention_mask [1,512]`,
33
+ `marker_pos [1,2]`, `marker_mask [1,2]`, `qtype [1]`
34
+ - Output (`float32`): `logits [1,2]` — `[now, later]`, pre-temperature raw
35
+ logits from the source `DecisionModel.scorer` head.
36
+ - Special token ids: `pad=50283 cls=50281 sep=50282 mask=50284`
37
+ - Sequence format follows upstream `laya.common.build_sequence` with
38
+ `max_len=512, head_max_len=192`, one fixed instruction/option pair (see
39
+ `laya_manifest.json`).
40
+
41
+ ## Parity evidence (from the exporter that produced this package)
42
+
43
+ - Source PyTorch vs traced PyTorch: max abs error `0.0` (exact) across 24
44
+ fixture cases.
45
+ - Native Core ML (`CPU_AND_NE` requested) vs source, 48 cases (24 English +
46
+ 24 real Korean→English machine translations): argmax agreement 48/48; max
47
+ abs logit error `0.2274`; max abs option-margin error `0.2588`. Native
48
+ Swift `MLComputePlan` reports 1188 of ~1220 known ops preferred for the
49
+ Neural Engine (120 linear, 56 matmul, 61 layer_norm, 28 softmax), 32
50
+ preferred CPU — this is a compiler placement report, not a runtime device
51
+ trace.
52
+ - An FP32 variant reproduces the source almost exactly (max abs error
53
+ `1.4e-5`) but the compiler prefers CPU for all ops in that variant, so it
54
+ is not an ANE artifact; it is not published here.
55
+
56
+ ## Files
57
+
58
+ - `laya_english.mlpackage/` — compiled-at-load Core ML package (FP16,
59
+ `logits`-only output)
60
+ - `tokenizer.json`, `tokenizer_config.json` — copied unmodified from the
61
+ source checkpoint's `tokenizer/`
62
+ - `laya_manifest.json` — file list with SHA-256 and sizes, IO contract,
63
+ special token ids
laya_english.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f43cdcc47ddbbe67298bfe79419dc29368766470665af22cd62eec56b6d8868a
3
+ size 678949
laya_english.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:5d0541cba4ba908c3ec95e14d90739cab023f6c97801ac08ef891f38669a8b97
3
+ size 842357120
laya_english.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "04C2190A-819A-4A18-ACA1-AC98F13CB544": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "568EC863-4609-41CF-9375-8109302E29C6": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "04C2190A-819A-4A18-ACA1-AC98F13CB544"
18
+ }
laya_manifest.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format": "laya-priority-coreml-english",
3
+ "source": {
4
+ "repo": "convaiinnovations/laya",
5
+ "revision": "55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851"
6
+ },
7
+ "graph": "standard-fp16-logits-only",
8
+ "sequence_length": 512,
9
+ "inputs": {
10
+ "input_ids": [
11
+ 1,
12
+ 512
13
+ ],
14
+ "attention_mask": [
15
+ 1,
16
+ 512
17
+ ],
18
+ "marker_pos": [
19
+ 1,
20
+ 2
21
+ ],
22
+ "marker_mask": [
23
+ 1,
24
+ 2
25
+ ],
26
+ "qtype": [
27
+ 1
28
+ ]
29
+ },
30
+ "outputs": {
31
+ "logits": [
32
+ 1,
33
+ 2
34
+ ]
35
+ },
36
+ "dtype": {
37
+ "inputs": "int32",
38
+ "outputs": "float32"
39
+ },
40
+ "special_tokens": {
41
+ "pad": 50283,
42
+ "cls": 50281,
43
+ "sep": 50282,
44
+ "mask": 50284
45
+ },
46
+ "model_package": "laya_english.mlpackage",
47
+ "files": {
48
+ "laya_english.mlpackage/Manifest.json": {
49
+ "sha256": "cd127062a620313512df5e38e55058c78edbabfea750f5c228f03f115ee6ce04",
50
+ "size": 617
51
+ },
52
+ "laya_english.mlpackage/Data/com.apple.CoreML/model.mlmodel": {
53
+ "sha256": "f43cdcc47ddbbe67298bfe79419dc29368766470665af22cd62eec56b6d8868a",
54
+ "size": 678949
55
+ },
56
+ "laya_english.mlpackage/Data/com.apple.CoreML/weights/weight.bin": {
57
+ "sha256": "5d0541cba4ba908c3ec95e14d90739cab023f6c97801ac08ef891f38669a8b97",
58
+ "size": 842357120
59
+ },
60
+ "tokenizer.json": {
61
+ "sha256": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30",
62
+ "size": 3583228
63
+ },
64
+ "tokenizer_config.json": {
65
+ "sha256": "50044de60daaa73df97d262e15a40d4faf0160e7d742df64b377877a1320dd12",
66
+ "size": 308
67
+ }
68
+ }
69
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clean_up_tokenization_spaces": true,
3
+ "cls_token": "[CLS]",
4
+ "mask_token": "[MASK]",
5
+ "model_input_names": [
6
+ "input_ids",
7
+ "attention_mask"
8
+ ],
9
+ "model_max_length": 8192,
10
+ "pad_token": "[PAD]",
11
+ "sep_token": "[SEP]",
12
+ "tokenizer_class": "PreTrainedTokenizerFast",
13
+ "unk_token": "[UNK]"
14
+ }