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
Install with the local extra; tag as text-classification
The Install section says pip install gliner2, but the base profile is torch-free and the next line imports AutoExtractor, which fails without the local extra (see the install section in the GLiNER2 README). Also switch pipeline_tag from token-classification to text-classification so the Hub lists this classification checkpoint under the task it serves.
Thanks for the catch. I checked the install point against the GLiNER2 README: plain pip install gliner2 is torch-free and needs the local extra, so the install line is right.
I'd hold the rest of this PR. main has moved since it was opened, and merging it as-is would also revert recent deliberate changes: library_name: transformers, pipeline_tag: schema-extraction, the decision-model tag, and the agent.fastino.ai banner links. It would also delete the Fine-tuning section that was just added in #12.
I opened #13 with only the install-line change, on current main. If you want the pipeline_tag or banner changes, they're worth proposing separately so the model owners can decide on each.
Update: the install-line change from this PR landed via #13. The one remaining idea, pipeline_tag: text-classification, is now a single-line PR on current main in #14, for the model owners to decide on since #11 chose schema-extraction deliberately. The library_name, decision-model tag and banner changes aren't included because they would revert #10, #11 and the earlier banner commits. Thanks @bkinge for the suggestions.
I rebased this PR onto current main to resolve the conflict. Its diff is now a single line, pipeline_tag: schema-extraction -> text-classification. The install-line fix already landed via #13, and the library_name, decision-model tag and banner changes are left as they are on main (they were changed deliberately in #10 and #11). Thanks @bkinge for the suggestions.
@MattThomas-fastino this is ready to merge or close at your call. #11 chose schema-extraction to match the Gliner2ForSchemaExtraction pipeline name, while the Hub's metadata validator warns that schema-extraction is not in its official pipeline tag list. config.json is untouched either way.