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
File size: 680 Bytes
fcf4209 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """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",
)
|