Instructions to use FluidInference/gliner2-5-small-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use FluidInference/gliner2-5-small-coreml with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("FluidInference/gliner2-5-small-coreml") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
Record AC paired timing for embedding int8 variant
Browse files
README.md
CHANGED
|
@@ -60,8 +60,10 @@ bytes, 32.2% less than FP16. It matched the native classifier's chosen label
|
|
| 60 |
on the same 100 eligible application requests (largest chosen-label confidence
|
| 61 |
difference 0.01685). A paired 14-request FP16 comparison kept every choice
|
| 62 |
with worst absolute probability difference 0.01758 on CPU+ANE. Full-request
|
| 63 |
-
CPU+ANE medians were 3.701 ms FP16 and 3.719 ms int8 on battery power
|
| 64 |
-
|
|
|
|
|
|
|
| 65 |
scope and is selected explicitly:
|
| 66 |
|
| 67 |
```bash
|
|
|
|
| 60 |
on the same 100 eligible application requests (largest chosen-label confidence
|
| 61 |
difference 0.01685). A paired 14-request FP16 comparison kept every choice
|
| 62 |
with worst absolute probability difference 0.01758 on CPU+ANE. Full-request
|
| 63 |
+
CPU+ANE medians were 3.701 ms FP16 and 3.719 ms int8 on battery power; one
|
| 64 |
+
small AC-powered paired check measured 3.702 and 3.668 ms. The results are
|
| 65 |
+
effectively tied, so this is a size option, not a speed claim. The package
|
| 66 |
+
retains L128/K8 classification
|
| 67 |
scope and is selected explicitly:
|
| 68 |
|
| 69 |
```bash
|
reports/ANE-OPTIMIZATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# GLiNER2.5 small L128/K8 compression checks (2026-09-22)
|
| 2 |
|
| 3 |
-
|
| 4 |
[`optimization-selected20.jsonl`](../fixtures/optimization-selected20.jsonl)
|
| 5 |
contains five source-order requests from each of four application suites. Six
|
| 6 |
requests exceed this package's L128 bucket, leaving 14 checked. Timed calls
|
|
@@ -23,6 +23,13 @@ comparisons, and a zero-runtime weight dequantization constant. The FP16 plan
|
|
| 23 |
assigned 496/512 operations to ANE with 16 CPU operations. Their measured
|
| 24 |
request medians were effectively tied; the main CPU boundary remains.
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
The exact package shapes, requests, per-request timings, skips, power state,
|
| 27 |
and conversion metadata are in adjacent JSON reports. These variants were
|
| 28 |
tested as classification paths only; the original checkpoint's extraction
|
|
|
|
| 1 |
# GLiNER2.5 small L128/K8 compression checks (2026-09-22)
|
| 2 |
|
| 3 |
+
The initial results are from one Apple M5 Pro on battery. The fixed, gold-free
|
| 4 |
[`optimization-selected20.jsonl`](../fixtures/optimization-selected20.jsonl)
|
| 5 |
contains five source-order requests from each of four application suites. Six
|
| 6 |
requests exceed this package's L128 bucket, leaving 14 checked. Timed calls
|
|
|
|
| 23 |
assigned 496/512 operations to ANE with 16 CPU operations. Their measured
|
| 24 |
request medians were effectively tied; the main CPU boundary remains.
|
| 25 |
|
| 26 |
+
After the Mac switched to AC power, one additional paired CPU+ANE check on
|
| 27 |
+
the **same 14 valid requests** again kept all choices and the 0.01758 maximum
|
| 28 |
+
probability difference. Full-request p50 was 3.702 ms FP16 and 3.668 ms
|
| 29 |
+
embedding int8; model-call p50 was 3.285 and 3.289 ms respectively. These
|
| 30 |
+
differences are smaller than this small sample can resolve, so there is still
|
| 31 |
+
no demonstrated speed win. See `optimization-embedding-w8-selected20-cpu-ane-ac.json`.
|
| 32 |
+
|
| 33 |
The exact package shapes, requests, per-request timings, skips, power state,
|
| 34 |
and conversion metadata are in adjacent JSON reports. These variants were
|
| 35 |
tested as classification paths only; the original checkpoint's extraction
|
reports/optimization-embedding-w8-selected20-cpu-ane-ac.json
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"reference": "build/gliner2_small_classification_fp16_L128_K8.mlpackage",
|
| 3 |
+
"candidate": "build/gliner2_small_classification_embedding_w8_L128_K8.mlpackage",
|
| 4 |
+
"manifest": "fixtures/optimization-selected20.jsonl",
|
| 5 |
+
"compute_units": "cpu-ane",
|
| 6 |
+
"processor": "arm",
|
| 7 |
+
"machine": "arm64",
|
| 8 |
+
"macos": "27.0",
|
| 9 |
+
"power_audit_after_run": "Now drawing from 'AC Power'\n -InternalBattery-0 (id=35651683)\t35%; charging; (no estimate) present: true",
|
| 10 |
+
"reference_load_ms": 2346.74583299784,
|
| 11 |
+
"candidate_load_ms": 3309.3039579689503,
|
| 12 |
+
"warmup_calls_per_model": 1,
|
| 13 |
+
"timed_order": "alternating reference-first/candidate-first by request",
|
| 14 |
+
"checked": 14,
|
| 15 |
+
"skipped": [
|
| 16 |
+
{
|
| 17 |
+
"suite": "app.phishing",
|
| 18 |
+
"index": 0,
|
| 19 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"suite": "app.phishing",
|
| 23 |
+
"index": 1,
|
| 24 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"suite": "app.phishing",
|
| 28 |
+
"index": 4,
|
| 29 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"suite": "app.model_routing_domain",
|
| 33 |
+
"index": 0,
|
| 34 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"suite": "app.model_routing_domain",
|
| 38 |
+
"index": 2,
|
| 39 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"suite": "app.model_routing_domain",
|
| 43 |
+
"index": 3,
|
| 44 |
+
"reason": "Input exceeds bucket or classification markers were truncated"
|
| 45 |
+
}
|
| 46 |
+
],
|
| 47 |
+
"choice_agreement": 14,
|
| 48 |
+
"max_probability_error": 0.017578125,
|
| 49 |
+
"probability_error_limit": 0.02,
|
| 50 |
+
"reference_p50_ms": 3.2854789751581848,
|
| 51 |
+
"candidate_p50_ms": 3.289312473498285,
|
| 52 |
+
"reference_p95_ms": 3.494042030069977,
|
| 53 |
+
"candidate_p95_ms": 3.3776669879443944,
|
| 54 |
+
"reference_total_p50_ms": 3.7023129989393055,
|
| 55 |
+
"candidate_total_p50_ms": 3.6675420124083757,
|
| 56 |
+
"cases": [
|
| 57 |
+
{
|
| 58 |
+
"suite": "jev.ag_news",
|
| 59 |
+
"index": 0,
|
| 60 |
+
"choice_agrees": true,
|
| 61 |
+
"max_probability_error": 0.0040283203125,
|
| 62 |
+
"prepare_ms": 5.009791988413781,
|
| 63 |
+
"reference_ms": 3.3950000070035458,
|
| 64 |
+
"candidate_ms": 3.3776669879443944,
|
| 65 |
+
"reference_total_ms": 8.404791995417327,
|
| 66 |
+
"candidate_total_ms": 8.387458976358175
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"suite": "jev.ag_news",
|
| 70 |
+
"index": 1,
|
| 71 |
+
"choice_agrees": true,
|
| 72 |
+
"max_probability_error": 0.017578125,
|
| 73 |
+
"prepare_ms": 1.03854201734066,
|
| 74 |
+
"reference_ms": 3.494042030069977,
|
| 75 |
+
"candidate_ms": 3.3097920240834355,
|
| 76 |
+
"reference_total_ms": 4.532584047410637,
|
| 77 |
+
"candidate_total_ms": 4.348334041424096
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"suite": "jev.ag_news",
|
| 81 |
+
"index": 2,
|
| 82 |
+
"choice_agrees": true,
|
| 83 |
+
"max_probability_error": 0.00439453125,
|
| 84 |
+
"prepare_ms": 1.0530000436119735,
|
| 85 |
+
"reference_ms": 3.3029590267688036,
|
| 86 |
+
"candidate_ms": 3.3412500051781535,
|
| 87 |
+
"reference_total_ms": 4.355959070380777,
|
| 88 |
+
"candidate_total_ms": 4.394250048790127
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"suite": "jev.ag_news",
|
| 92 |
+
"index": 3,
|
| 93 |
+
"choice_agrees": true,
|
| 94 |
+
"max_probability_error": 0.00390625,
|
| 95 |
+
"prepare_ms": 0.6998750031925738,
|
| 96 |
+
"reference_ms": 3.2783339847810566,
|
| 97 |
+
"candidate_ms": 3.2704590121284127,
|
| 98 |
+
"reference_total_ms": 3.9782089879736304,
|
| 99 |
+
"candidate_total_ms": 3.9703340153209865
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"suite": "jev.ag_news",
|
| 103 |
+
"index": 4,
|
| 104 |
+
"choice_agrees": true,
|
| 105 |
+
"max_probability_error": 0.0029296875,
|
| 106 |
+
"prepare_ms": 0.4724999889731407,
|
| 107 |
+
"reference_ms": 3.3395829959772527,
|
| 108 |
+
"candidate_ms": 3.255374962463975,
|
| 109 |
+
"reference_total_ms": 3.8120829849503934,
|
| 110 |
+
"candidate_total_ms": 3.7278749514371157
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"suite": "jev.emotion",
|
| 114 |
+
"index": 0,
|
| 115 |
+
"choice_agrees": true,
|
| 116 |
+
"max_probability_error": 0.0029296875,
|
| 117 |
+
"prepare_ms": 0.3194170421920717,
|
| 118 |
+
"reference_ms": 3.3317499910481274,
|
| 119 |
+
"candidate_ms": 3.287792031187564,
|
| 120 |
+
"reference_total_ms": 3.651167033240199,
|
| 121 |
+
"candidate_total_ms": 3.607209073379636
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"suite": "jev.emotion",
|
| 125 |
+
"index": 1,
|
| 126 |
+
"choice_agrees": true,
|
| 127 |
+
"max_probability_error": 0.0009765625,
|
| 128 |
+
"prepare_ms": 0.20474998746067286,
|
| 129 |
+
"reference_ms": 3.2854159944690764,
|
| 130 |
+
"candidate_ms": 3.289374988526106,
|
| 131 |
+
"reference_total_ms": 3.4901659819297493,
|
| 132 |
+
"candidate_total_ms": 3.4941249759867787
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"suite": "jev.emotion",
|
| 136 |
+
"index": 2,
|
| 137 |
+
"choice_agrees": true,
|
| 138 |
+
"max_probability_error": 0.00390625,
|
| 139 |
+
"prepare_ms": 0.24145800853148103,
|
| 140 |
+
"reference_ms": 3.2376659801229835,
|
| 141 |
+
"candidate_ms": 3.2137499656528234,
|
| 142 |
+
"reference_total_ms": 3.4791239886544645,
|
| 143 |
+
"candidate_total_ms": 3.4552079741843045
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"suite": "jev.emotion",
|
| 147 |
+
"index": 3,
|
| 148 |
+
"choice_agrees": true,
|
| 149 |
+
"max_probability_error": 0.01513671875,
|
| 150 |
+
"prepare_ms": 0.2579169813543558,
|
| 151 |
+
"reference_ms": 3.2402919605374336,
|
| 152 |
+
"candidate_ms": 3.2786669908091426,
|
| 153 |
+
"reference_total_ms": 3.4982089418917894,
|
| 154 |
+
"candidate_total_ms": 3.5365839721634984
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"suite": "jev.emotion",
|
| 158 |
+
"index": 4,
|
| 159 |
+
"choice_agrees": true,
|
| 160 |
+
"max_probability_error": 5.7220458984375e-06,
|
| 161 |
+
"prepare_ms": 0.9694579639472067,
|
| 162 |
+
"reference_ms": 3.2319999882020056,
|
| 163 |
+
"candidate_ms": 3.2892499584704638,
|
| 164 |
+
"reference_total_ms": 4.201457952149212,
|
| 165 |
+
"candidate_total_ms": 4.2587079224176705
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"suite": "app.phishing",
|
| 169 |
+
"index": 2,
|
| 170 |
+
"choice_agrees": true,
|
| 171 |
+
"max_probability_error": 0.0,
|
| 172 |
+
"prepare_ms": 0.1432499848306179,
|
| 173 |
+
"reference_ms": 3.2535000354982913,
|
| 174 |
+
"candidate_ms": 3.3028339967131615,
|
| 175 |
+
"reference_total_ms": 3.396750020328909,
|
| 176 |
+
"candidate_total_ms": 3.4460839815437794
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"suite": "app.phishing",
|
| 180 |
+
"index": 3,
|
| 181 |
+
"choice_agrees": true,
|
| 182 |
+
"max_probability_error": 0.00244140625,
|
| 183 |
+
"prepare_ms": 0.46791700879111886,
|
| 184 |
+
"reference_ms": 3.285541955847293,
|
| 185 |
+
"candidate_ms": 3.28716600779444,
|
| 186 |
+
"reference_total_ms": 3.753458964638412,
|
| 187 |
+
"candidate_total_ms": 3.7550830165855587
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"suite": "app.model_routing_domain",
|
| 191 |
+
"index": 1,
|
| 192 |
+
"choice_agrees": true,
|
| 193 |
+
"max_probability_error": 0.0009765625,
|
| 194 |
+
"prepare_ms": 0.1925830147229135,
|
| 195 |
+
"reference_ms": 3.277582989539951,
|
| 196 |
+
"candidate_ms": 3.34716698853299,
|
| 197 |
+
"reference_total_ms": 3.4701660042628646,
|
| 198 |
+
"candidate_total_ms": 3.5397500032559037
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"suite": "app.model_routing_domain",
|
| 202 |
+
"index": 4,
|
| 203 |
+
"choice_agrees": true,
|
| 204 |
+
"max_probability_error": 0.00341796875,
|
| 205 |
+
"prepare_ms": 0.2633749973028898,
|
| 206 |
+
"reference_ms": 3.3152500400319695,
|
| 207 |
+
"candidate_ms": 3.3124579931609333,
|
| 208 |
+
"reference_total_ms": 3.5786250373348594,
|
| 209 |
+
"candidate_total_ms": 3.575832990463823
|
| 210 |
+
}
|
| 211 |
+
]
|
| 212 |
+
}
|