Instructions to use cimo001/urchade with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use cimo001/urchade with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("cimo001/urchade") 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 README.md from cimo001/urchade: direct link, hf CLI and curl.
- Browser
- Download file 1.87 kB
-
https://huggingface.co/cimo001/urchade/resolve/main/README.md
- Command line
-
hf download hf://cimo001/urchade/README.md
-
curl -L -o README.md https://huggingface.co/cimo001/urchade/resolve/main/README.md
1.87 kB
| license: apache-2.0 | |
| base_model: urchade | |
| pipeline_tag: token-classification | |
| library_name: onnx | |
| language: | |
| - multilingual | |
| tags: | |
| - ner | |
| - gliner | |
| - urchade | |
| - onnx | |
| # ONNX - Urchade | |
| | Model | FP32 | INT8 | Task | | |
| | --- | --- | --- | --- | | |
| | gliner_multi-v2.1 | model.onnx | model_quantized.onnx | named entity recognition | | |
| ## Usage | |
| ``` | |
| # onnxruntime-gpu for run it on GPU | |
| pip install onnxruntime sentencepiece numpy protobuf | |
| ``` | |
| Every model folder has the same layout: | |
| - `src/helper.py` = onnx session builder (provider selection, threads, memory options) | |
| - `src/example.py` = full pipeline: word split, sentencepiece tokenization, span enumeration, inference, greedy non-overlap selection | |
| - `onnx/` = the model file | |
| Run the commands from the repository root. | |
| ## gliner_multi-v2.1 | |
| - [gliner_multi-v2.1/src/example.py](gliner_multi-v2.1/src/example.py) | |
| ``` | |
| python3 gliner_multi-v2.1/src/example.py | |
| ``` | |
| ``` | |
| 0.970778 | person | Linus Torvalds | |
| 0.603953 | organization | Linux | |
| 0.978727 | place | Helsinki | |
| 0.859634 | organization | Linux Foundation | |
| 0.944801 | person | 田中太郎 | |
| 0.674417 | organization | 東京大学 | |
| 0.953844 | place | Tokyo | |
| ``` | |
| Note: | |
| - No transformers/tokenizers dependency: the tokenizer is `spm.model` loaded via proto with the patch<br> | |
| `normalizer_spec.add_dummy_prefix = False` (required for the word-level alignment). | |
| - Entity types are free text, passed in the input sequence:<br> | |
| `[cls] [ent] type... [ent] type... [sep] word... [eos]`, with `[ent]` = 250103, `[sep]` = 250104. | |
| - `words_mask` marks the first subword of each word with the word number (1-based), 0 elsewhere. | |
| - Digits are tokenized one at a time (`\d|\D+`), CJK characters are split one word each. | |
| - Spans are enumerated per word up to width 12, score = sigmoid(logit), greedy selection without overlap. | |
| - Normalize input with NFKC for consistent multilingual scores. | |