Text Classification
Transformers
Safetensors
GLiNER2
English
Text classification
Intent classification
Sentiment Analysis
Topic classification
Named Entity Recognition
decision-model
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) - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
2125c8a
1
Parent(s): a6ef71c
Load this checkpoint as a Transformers schema-extraction model. (#11)
Browse files- Load this checkpoint as a Transformers schema-extraction model. (c5ac444f78bbc1bd0ad0e8f0cc0236898e099370)
Co-authored-by: Matthew Thomas <MattThomas-fastino@users.noreply.huggingface.co>
- README.md +2 -2
- config.json +36 -2
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
library_name:
|
| 3 |
license: apache-2.0
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
-
pipeline_tag:
|
| 7 |
tags:
|
| 8 |
- gliner2
|
| 9 |
- Text classification
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
+
pipeline_tag: schema-extraction
|
| 7 |
tags:
|
| 8 |
- gliner2
|
| 9 |
- Text classification
|
config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"architecture": "span",
|
| 5 |
"architecture_version": 1,
|
| 6 |
"architectures": [
|
| 7 |
-
"
|
| 8 |
],
|
| 9 |
"attn_implementation": "sdpa",
|
| 10 |
"config_version": 3,
|
|
@@ -12,7 +12,41 @@
|
|
| 12 |
"max_len": null,
|
| 13 |
"max_width": 8,
|
| 14 |
"model_name": "microsoft/deberta-v3-large",
|
| 15 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
"span_head": {
|
| 17 |
"dropout": 0.1,
|
| 18 |
"max_width": 8,
|
|
|
|
| 4 |
"architecture": "span",
|
| 5 |
"architecture_version": 1,
|
| 6 |
"architectures": [
|
| 7 |
+
"Gliner2ForSchemaExtraction"
|
| 8 |
],
|
| 9 |
"attn_implementation": "sdpa",
|
| 10 |
"config_version": 3,
|
|
|
|
| 12 |
"max_len": null,
|
| 13 |
"max_width": 8,
|
| 14 |
"model_name": "microsoft/deberta-v3-large",
|
| 15 |
+
"encoder_config": {
|
| 16 |
+
"_attn_implementation_autoset": true,
|
| 17 |
+
"_name_or_path": "/home/urchadezaratiana/checkpoints/checkpoint-45500/encoder_config/config.json",
|
| 18 |
+
"attention_probs_dropout_prob": 0.1,
|
| 19 |
+
"dtype": "float32",
|
| 20 |
+
"hidden_act": "gelu",
|
| 21 |
+
"hidden_dropout_prob": 0.1,
|
| 22 |
+
"hidden_size": 1024,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 4096,
|
| 25 |
+
"layer_norm_eps": 1e-07,
|
| 26 |
+
"legacy": true,
|
| 27 |
+
"max_position_embeddings": 512,
|
| 28 |
+
"max_relative_positions": -1,
|
| 29 |
+
"model_type": "deberta-v2",
|
| 30 |
+
"norm_rel_ebd": "layer_norm",
|
| 31 |
+
"num_attention_heads": 16,
|
| 32 |
+
"num_hidden_layers": 24,
|
| 33 |
+
"pad_token_id": 0,
|
| 34 |
+
"pooler_dropout": 0,
|
| 35 |
+
"pooler_hidden_act": "gelu",
|
| 36 |
+
"pooler_hidden_size": 1024,
|
| 37 |
+
"pos_att_type": [
|
| 38 |
+
"p2c",
|
| 39 |
+
"c2p"
|
| 40 |
+
],
|
| 41 |
+
"position_biased_input": false,
|
| 42 |
+
"position_buckets": 256,
|
| 43 |
+
"relative_attention": true,
|
| 44 |
+
"share_att_key": true,
|
| 45 |
+
"transformers_version": "4.48.1",
|
| 46 |
+
"type_vocab_size": 0,
|
| 47 |
+
"vocab_size": 128011
|
| 48 |
+
},
|
| 49 |
+
"model_type": "gliner2",
|
| 50 |
"span_head": {
|
| 51 |
"dropout": 0.1,
|
| 52 |
"max_width": 8,
|