Token Classification
Safetensors
GLiNER2
GLiNER
English
openmed
extractor
medical
biomedical
named-entity-recognition
procedure
diagnostic-procedure
laboratory-procedure
therapeutic-procedure
Eval Results (legacy)
Instructions to use OpenMed/GLiNER2.5-ProceduresTests-Small-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use OpenMed/GLiNER2.5-ProceduresTests-Small-v1 with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("OpenMed/GLiNER2.5-ProceduresTests-Small-v1") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - GLiNER
How to use OpenMed/GLiNER2.5-ProceduresTests-Small-v1 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("OpenMed/GLiNER2.5-ProceduresTests-Small-v1") 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
Download config.json from OpenMed/GLiNER2.5-ProceduresTests-Small-v1: direct link, hf CLI and curl.
- Browser
- Download file 4.1 kB
-
https://huggingface.co/OpenMed/GLiNER2.5-ProceduresTests-Small-v1/resolve/main/config.json
- Command line
-
hf download hf://OpenMed/GLiNER2.5-ProceduresTests-Small-v1/config.json
-
curl -L -o config.json https://huggingface.co/OpenMed/GLiNER2.5-ProceduresTests-Small-v1/resolve/main/config.json
4.1 kB
| { | |
| "architecture": "boundary", | |
| "architecture_version": 1, | |
| "architectures": [ | |
| "BoundaryExtractor" | |
| ], | |
| "attn_implementation": "sdpa", | |
| "boundary_head": { | |
| "abstention_loss_weight": 0.2, | |
| "abstention_threshold": 0.5, | |
| "adaptive_threshold": false, | |
| "bidirectional_proposals": true, | |
| "boundary_attention_heads": 4, | |
| "boundary_attention_layers": 2, | |
| "boundary_attention_window": 128, | |
| "boundary_dim": 128, | |
| "boundary_ffn_multiplier": 2.0, | |
| "boundary_focal_clip": 0.05, | |
| "boundary_focal_gamma_negative": 2.0, | |
| "boundary_focal_gamma_positive": 0.0, | |
| "boundary_marginal_loss": "asymmetric_focal", | |
| "boundary_negative_weight": 0.5, | |
| "boundary_refinement_layers": 1, | |
| "boundary_top_k_alpha": 0.08, | |
| "boundary_top_k_bucket": 8, | |
| "boundary_top_k_max": 128, | |
| "candidate_attention_heads": 4, | |
| "candidate_attention_layers": 0, | |
| "candidate_budget": 192, | |
| "candidate_pool": "shared", | |
| "classification_loss_weight": 1.0, | |
| "classification_temperature": 1.0, | |
| "consistency_loss_weight": 0.1, | |
| "consistency_warmup_steps": 2000, | |
| "content_dim": 64, | |
| "content_soft_max_pool": false, | |
| "count_loss_weight": 0.2, | |
| "directional_relation_states": true, | |
| "dropout": 0.1, | |
| "enable_abstention": true, | |
| "enable_count_head": true, | |
| "enable_records": true, | |
| "enable_relations": true, | |
| "enable_rotary_endpoints": true, | |
| "enable_span_content": true, | |
| "end_block_size": 256, | |
| "end_top_k": 24, | |
| "endpoint_difference_features": true, | |
| "ends_per_start": 12, | |
| "export_mode": "auto", | |
| "hard_negative_keep_all_when_absent": true, | |
| "hard_negatives_per_positive": 20, | |
| "loss_reduction": "sum", | |
| "max_gold_per_query": 64, | |
| "max_negative_queries_per_batch": 64, | |
| "min_pool_per_query": 8, | |
| "minimum_hard_negatives": 16, | |
| "multihead_pair_compat_heads": 8, | |
| "negative_query_ratio": 1.0, | |
| "overlap_policy": "flat", | |
| "pair_dim": 128, | |
| "pair_temperature": 1.0, | |
| "pool_boundary_top_k": 32, | |
| "pool_size": 192, | |
| "proposal_loss_weight": 0.3, | |
| "query_attention_layers": 0, | |
| "query_conditioned_inside_weight": true, | |
| "record_anchor_proposal_threshold": 0.2, | |
| "record_anchor_threshold": 0.5, | |
| "record_dim": 128, | |
| "record_field_threshold": 0.5, | |
| "record_instance_queries": 32, | |
| "record_loss_weight": 1.0, | |
| "record_temperature": 1.0, | |
| "relation_argument_proposal_threshold": 0.2, | |
| "relation_biaffine_content": true, | |
| "relation_heads_per_type": 32, | |
| "relation_loss_weight": 1.0, | |
| "relation_pair_cap": 64, | |
| "relation_tails_per_type": 32, | |
| "relation_temperature": 1.0, | |
| "rerank_listwise_weight": 0.3, | |
| "reranker_endpoint_compat": true, | |
| "rotary_base": 10000.0, | |
| "soft_iou_anneal_steps": 20000, | |
| "soft_iou_aux_weight": 0.2, | |
| "start_top_k": 24, | |
| "starts_per_end": 12, | |
| "training_candidate_budget": 192, | |
| "use_inside_evidence": true, | |
| "vectorized_pair_elements": 16777216 | |
| }, | |
| "config_version": 3, | |
| "encoder_config": { | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": null, | |
| "dtype": "float16", | |
| "eos_token_id": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 384, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "layer_norm_eps": 1e-07, | |
| "legacy": true, | |
| "max_position_embeddings": 512, | |
| "max_relative_positions": -1, | |
| "model_type": "deberta-v2", | |
| "norm_rel_ebd": "layer_norm", | |
| "num_attention_heads": 6, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "pooler_dropout": 0.0, | |
| "pooler_hidden_act": "gelu", | |
| "pooler_hidden_size": 384, | |
| "pos_att_type": [ | |
| "p2c", | |
| "c2p" | |
| ], | |
| "position_biased_input": false, | |
| "position_buckets": 256, | |
| "relative_attention": true, | |
| "share_att_key": true, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.8.0", | |
| "type_vocab_size": 0, | |
| "vocab_size": 128011 | |
| }, | |
| "max_len": 4096, | |
| "model_name": "microsoft/deberta-v3-xsmall", | |
| "model_type": "extractor", | |
| "token_pooling": "first", | |
| "transformers_version": "4.57.6" | |
| } | |