Instructions to use fastino/GLiNER2.5-Decide with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fastino/GLiNER2.5-Decide with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="fastino/GLiNER2.5-Decide")# pip install -U transformers accelerate # Load model directly from transformers import Gliner2ForSchemaExtraction model = Gliner2ForSchemaExtraction.from_pretrained("fastino/GLiNER2.5-Decide", device_map="auto") - GLiNER2
How to use fastino/GLiNER2.5-Decide with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("fastino/GLiNER2.5-Decide") # 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
Tag as text-classification (pipeline_tag only)
Carries over the one change from #8 that is not already on main, as a single line on current main: pipeline_tag: schema-extraction becomes text-classification. Everything else in #8 (the library_name, the decision-model tag, the banner links) is left as main has it, because those were changed deliberately in #10, #11 and the Sep 28 banner commits.
Why: when this card was uploaded, the Hub's metadata validator warned that schema-extraction is not in its list of official pipeline tags. Hub task filters and search key off that list, and this checkpoint is used for classification (classify_text), which text-classification lists correctly.
Trade-off, for the model owners to decide: #11 chose schema-extraction on purpose, to match the native Transformers pipeline("schema-extraction", ...) class (Gliner2ForSchemaExtraction). This PR does not touch config.json, so that loading path is unaffected, but the card tag and that pipeline name would no longer be identical.
@MattThomas-fastino could you decide whether to take this? Credit for the original suggestion goes to @bkinge (#8).