MiniCheck-RoBERTa-Large Core ML (ANE) + tokenizer for MMAI faithfulness judge
Browse files- MiniCheckRoBERTa.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- MiniCheckRoBERTa.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- MiniCheckRoBERTa.mlpackage/Manifest.json +18 -0
- README.md +33 -0
- merges.txt +0 -0
- special_tokens_map.json +16 -0
- tokenizer.json +0 -0
- tokenizer_config.json +68 -0
- vocab.json +0 -0
MiniCheckRoBERTa.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4cdc1fe88ce0936308490c4a7c85d0c77c0e635132b1d83cd63dcb12a974738f
|
| 3 |
+
size 276719
|
MiniCheckRoBERTa.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:15f22abc98406af87baa7d49852f3ab96fc119d37abfa5be8a811cabd989e578
|
| 3 |
+
size 711795264
|
MiniCheckRoBERTa.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"EC56BA98-EED7-4677-9412-98AEDF446051": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"F1806992-3F3F-4330-AE25-7DF584182E93": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "EC56BA98-EED7-4677-9412-98AEDF446051"
|
| 18 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: lytang/MiniCheck-RoBERTa-Large
|
| 4 |
+
tags:
|
| 5 |
+
- coreml
|
| 6 |
+
- text-classification
|
| 7 |
+
- fact-checking
|
| 8 |
+
- grounding
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# MiniCheck-RoBERTa-Large — Core ML (Apple Neural Engine)
|
| 14 |
+
|
| 15 |
+
Core ML conversion of [lytang/MiniCheck-RoBERTa-Large](https://huggingface.co/lytang/MiniCheck-RoBERTa-Large)
|
| 16 |
+
(MIT) — a specialized grounding / fact-verification model — for in-app use on the **Apple Neural Engine**
|
| 17 |
+
via Core ML. Used by Marvel Mirror AI as a claim-by-claim faithfulness judge: *does a source support a claim?*
|
| 18 |
+
|
| 19 |
+
## Contents
|
| 20 |
+
- `MiniCheckRoBERTa.mlpackage` — the Core ML model (fp16 weights). Inputs: `input_ids`, `attention_mask`
|
| 21 |
+
(int32, length 512). Output: `support_prob` = probability the claim is supported (class 1).
|
| 22 |
+
- RoBERTa fast-tokenizer files (`tokenizer.json`, `vocab.json`, `merges.txt`, `tokenizer_config.json`,
|
| 23 |
+
`special_tokens_map.json`).
|
| 24 |
+
|
| 25 |
+
## Input format
|
| 26 |
+
`doc + </s> + claim`, tokenized with the RoBERTa tokenizer (`max_length` 512, padded). `support_prob > 0.5`
|
| 27 |
+
= supported.
|
| 28 |
+
|
| 29 |
+
## Provenance
|
| 30 |
+
Converted with coremltools 9.0 (torch 2.7.0 / transformers 4.46.3), targeting CPU + Neural Engine.
|
| 31 |
+
~97% of compute-bearing ops run on the ANE. Verdict-parity with the PyTorch source (max probability
|
| 32 |
+
diff < 0.007); reproduces the source's full-set accuracy (21/21 fabrications caught, incl. all
|
| 33 |
+
meaning- and numeric-inversions). ~60 ms/check on the ANE.
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<s>",
|
| 4 |
+
"<pad>",
|
| 5 |
+
"</s>",
|
| 6 |
+
"<unk>",
|
| 7 |
+
"<mask>"
|
| 8 |
+
],
|
| 9 |
+
"bos_token": "<s>",
|
| 10 |
+
"cls_token": "<s>",
|
| 11 |
+
"eos_token": "</s>",
|
| 12 |
+
"mask_token": "<mask>",
|
| 13 |
+
"pad_token": "<pad>",
|
| 14 |
+
"sep_token": "</s>",
|
| 15 |
+
"unk_token": "<unk>"
|
| 16 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<s>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<pad>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"50264": {
|
| 37 |
+
"content": "<mask>",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"additional_special_tokens": [
|
| 46 |
+
"<s>",
|
| 47 |
+
"<pad>",
|
| 48 |
+
"</s>",
|
| 49 |
+
"<unk>",
|
| 50 |
+
"<mask>"
|
| 51 |
+
],
|
| 52 |
+
"bos_token": "<s>",
|
| 53 |
+
"clean_up_tokenization_spaces": true,
|
| 54 |
+
"cls_token": "<s>",
|
| 55 |
+
"eos_token": "</s>",
|
| 56 |
+
"errors": "replace",
|
| 57 |
+
"mask_token": "<mask>",
|
| 58 |
+
"max_length": 512,
|
| 59 |
+
"model_max_length": 512,
|
| 60 |
+
"pad_token": "<pad>",
|
| 61 |
+
"sep_token": "</s>",
|
| 62 |
+
"stride": 0,
|
| 63 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 64 |
+
"trim_offsets": true,
|
| 65 |
+
"truncation_side": "right",
|
| 66 |
+
"truncation_strategy": "longest_first",
|
| 67 |
+
"unk_token": "<unk>"
|
| 68 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|