Instructions to use urchade/gliner_medium-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use urchade/gliner_medium-v2 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("urchade/gliner_medium-v2") text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal." labels = ["person", "date", "location"] entities = model.predict_entities(text, labels) for entity in entities: print(entity["text"], "=>", entity["label"]) - Notebooks
- Google Colab
- Kaggle
File size: 478 Bytes
6b58425 17f0abe 6b58425 17f0abe 6b58425 17f0abe 6b58425 17f0abe 6b58425 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | {
"size_sup": -1,
"max_types": 25,
"shuffle_types": true,
"random_drop": true,
"max_neg_type_ratio": 1,
"max_len": 384,
"lr_encoder": "1e-5",
"lr_others": "5e-5",
"num_steps": 100000,
"warmup_ratio": 5000,
"train_batch_size": 8,
"eval_every": 10000,
"max_width": 12,
"model_name": "microsoft/deberta-v3-base",
"fine_tune": true,
"subtoken_pooling": "first",
"hidden_size": 512,
"span_mode": "markerV0",
"dropout": 0.4,
"name": "correct"
} |