Instructions to use smdesai/GLiNER25-Decide-FP16-CoreAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use smdesai/GLiNER25-Decide-FP16-CoreAI with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("smdesai/GLiNER25-Decide-FP16-CoreAI") # 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
GLiNER2.5-Decide β Core AI (iOS 27+ / macOS 27+)
| File | Purpose |
|---|---|
GLiNER25-Decide-FP16-CoreAI.aimodel/ |
Core AI source asset, FP16 (~873 MB), three functions sharing one set of weights |
tokenizer.json, tokenizer_config.json, special_tokens_map.json |
Checkpoint tokenizer |
model-card.md |
Upstream model card (fastino/GLiNER2.5-Decide, Apache-2.0) |
Source: checkpoint revision bbe10ff77ebb238777c17d3a8ac9260e30929057,
classification-only (DeBERTa encoder + classifier). Exported with
coreai-torch 0.4.3 / coreai-core 1.0.0b3 / Torch 2.11.0. The graph uses constant
relative-position buckets, gather-free relative-shift bias and fused SDPA.
Learned weights are unchanged.
Interface
Functions context128, context256, context512:
- inputs:
input_idsint32[1, L],attention_maskint32[1, L](1 = real token, 0 = padding) - output:
logits[1, L], one score per token position. Classification reads the positions of the schema's label markers ([L]).
Choose the smallest function that fits the request and pad to its length. Reject longer requests; do not truncate.
Required: GPU placement
let model = try await AIModel(
contentsOf: url, options: SpecializationOptions(preferredComputeUnitKind: .gpu))
Default placement was unsafe for this graph on iOS 27.2 with the previous export (coreai-torch 0.4.1). It crashed with an MPSGraph ANE-region assertion, and earlier assets showed per-launch nondeterminism at 128. Default placement has not been retested with this export; use GPU.
Validation (iPhone 17 Pro, iOS 27.2, GPU)
Strict gate: every decision matches the FP32 PyTorch oracle and max probability error β€ 0.005. Two launches, all functions: pass every launch, max error 0.0010, no decision mismatches. Corpora: 75 (128), 86 (256), 95 (512, including 9 requests of 296β512 tokens).
| Function | Median, launch 1 | Median, launch 2 |
|---|---|---|
| context128 | 34.6 ms | 36.0 ms |
| context256 | 49.3 ms | 53.6 ms |
| context512 | 111.6 ms | 115.9 ms |
The first load specializes the asset for the device (~8 s); later loads hit the system cache. After ~2 s idle, add β 45β50 ms (GPU wake-up).
SHA-256
038e5b01e0cbeb42661b12abde9ae20482b849e41a50dd477db264895ee5e708 GLiNER25-Decide-FP16-CoreAI.aimodel/main.mlirb
3ad87d9ffe669147063e70850927dd2da90249e2acc5c8527f1eb65df467bcc8 tokenizer.json