Instructions to use FluidInference/gliner2-5-multi-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use FluidInference/gliner2-5-multi-coreml with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("FluidInference/gliner2-5-multi-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
Download convert_extraction_names.py from FluidInference/gliner2-5-multi-coreml: direct link, hf CLI and curl.
- Browser
- Download file 680 Bytes
-
https://huggingface.co/FluidInference/gliner2-5-multi-coreml/resolve/main/convert_extraction_names.py
- Command line
-
hf download hf://FluidInference/gliner2-5-multi-coreml/convert_extraction_names.py
-
curl -L -o convert_extraction_names.py https://huggingface.co/FluidInference/gliner2-5-multi-coreml/resolve/main/convert_extraction_names.py
680 Bytes
| """Ordered tensor contract shared by extraction conversion and verification.""" | |
| FEATURE_NAMES = ( | |
| "text_states", | |
| "query_states", | |
| "boundary_states", | |
| "boundary_mask", | |
| "start_logits", | |
| "end_logits", | |
| "inside_prefix", | |
| "inside_prefix_mean", | |
| "pool_start_projection", | |
| "pool_end_projection", | |
| "null_logits", | |
| "count_log_rates", | |
| "classification_logits", | |
| ) | |
| SCORE_INPUT_NAMES = ( | |
| "text_states", | |
| "text_mask", | |
| "query_states", | |
| "query_mask", | |
| "boundary_states", | |
| "start_logits", | |
| "end_logits", | |
| "inside_prefix", | |
| "inside_prefix_mean", | |
| "candidate_indices", | |
| "candidate_mask", | |
| "candidate_compatibility", | |
| ) | |