Instructions to use spybyscript/gliner25-base-litert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use spybyscript/gliner25-base-litert with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- GLiNER2
How to use spybyscript/gliner25-base-litert with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("spybyscript/gliner25-base-litert") # 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
Card: what this port does, and what it leaves out
Browse files- README.md +22 -0
- SHA256SUMS +1 -1
README.md
CHANGED
|
@@ -29,6 +29,28 @@ its thirteen outputs) and the candidate scorer; the host's pool and decoders bet
|
|
| 29 |
| `gliner2_base_scorer_fp32.tflite` | 2.1 MB | scorer, FP32 |
|
| 30 |
| `gliner2_base_embeddings_f16.bin` | 197 MB | float16 [128011, 768], little-endian, row-major |
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
## Validation (Mac, not a phone)
|
| 33 |
|
| 34 |
2,521 base-v1 calls recorded from the gliner2 2.0.0 library on a synthetic English corpus of short conversational statements
|
|
|
|
| 29 |
| `gliner2_base_scorer_fp32.tflite` | 2.1 MB | scorer, FP32 |
|
| 30 |
| `gliner2_base_embeddings_f16.bin` | 197 MB | float16 [128011, 768], little-endian, row-major |
|
| 31 |
|
| 32 |
+
## What this port does, and what it leaves out
|
| 33 |
+
|
| 34 |
+
The original checkpoint has an encoder, a boundary head, a classifier, a record decoder and a relation scorer. This
|
| 35 |
+
port exports the encoder, a head graph (the boundary head's extraction outputs, the null and count outputs and the
|
| 36 |
+
classifier's choice logits) and the candidate scorer. The host runs the library's candidate pool and decoding between
|
| 37 |
+
and after them.
|
| 38 |
+
|
| 39 |
+
- **Entities**, as `extract_entities` returns them: labels with descriptions, thresholds, and the null head's
|
| 40 |
+
abstention.
|
| 41 |
+
- **Classification**, as `classify_text`: up to 8 choices.
|
| 42 |
+
- **Structures whose fields are plain spans**, as `extract_json` returns them through the library's structure decoder
|
| 43 |
+
without record mode.
|
| 44 |
+
- These three were validated on 2,521 recorded calls (see Validation).
|
| 45 |
+
- **Not available:** relation extraction (`extract_relations`; the original's `relation_scorer`) and record-mode
|
| 46 |
+
structures (the `record_decoder`, which groups fields into several records), nor the explicit-span head of
|
| 47 |
+
FluidInference's Core ML port. Requests that need them cannot run on this port.
|
| 48 |
+
- **Fixed sizes:** one call holds at most 128 subword tokens (prompt and text), 64 text words, 8 queries (entity labels
|
| 49 |
+
or structure fields) and 8 classification choices, with a candidate pool of 192. The host refuses larger requests
|
| 50 |
+
rather than truncating them. The original runs with dynamic shapes, so long texts and large label sets need several
|
| 51 |
+
calls here.
|
| 52 |
+
- **Weights:** only their storage and compute precision change (see the file table); nothing is retrained or pruned.
|
| 53 |
+
|
| 54 |
## Validation (Mac, not a phone)
|
| 55 |
|
| 56 |
2,521 base-v1 calls recorded from the gliner2 2.0.0 library on a synthetic English corpus of short conversational statements
|
SHA256SUMS
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
|
| 2 |
5d22fdeddc1ceccba0576afa514f74b43411afe769562ad1ac480c529d7cf0a1 NOTICE.txt
|
| 3 |
-
|
| 4 |
4c7cc23f44739e7a2633861f820df1576ffe9456d0613916f602ffbcf44f2fda config.json
|
| 5 |
22c2e937cfc17e1ee9c8f3ec6f1449d44dc9230cfcbb8737c9bae8492628a3e8 gliner2_base_embeddings_f16.bin
|
| 6 |
6f5241586176d6b123f75392bedd66a24c63f4105f8a45181dbc02385e95e5bb gliner2_base_encoder_fp16hw.tflite
|
|
|
|
| 1 |
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
|
| 2 |
5d22fdeddc1ceccba0576afa514f74b43411afe769562ad1ac480c529d7cf0a1 NOTICE.txt
|
| 3 |
+
c61268a2b9b76631c2c630a2cf626242a753983211f2bd305aa7300955a6253c README.md
|
| 4 |
4c7cc23f44739e7a2633861f820df1576ffe9456d0613916f602ffbcf44f2fda config.json
|
| 5 |
22c2e937cfc17e1ee9c8f3ec6f1449d44dc9230cfcbb8737c9bae8492628a3e8 gliner2_base_embeddings_f16.bin
|
| 6 |
6f5241586176d6b123f75392bedd66a24c63f4105f8a45181dbc02385e95e5bb gliner2_base_encoder_fp16hw.tflite
|