Instructions to use MU-NLPC/ner-gazetteers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MU-NLPC/ner-gazetteers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="MU-NLPC/ner-gazetteers")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("MU-NLPC/ner-gazetteers") model = AutoModelForTokenClassification.from_pretrained("MU-NLPC/ner-gazetteers", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from MU-NLPC/ner-gazetteers: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/MU-NLPC/ner-gazetteers/resolve/4e5ea9601677926399571074b2e85916dc4afd1c/config.json
- Command line
-
hf download hf://MU-NLPC/ner-gazetteers@4e5ea9601677926399571074b2e85916dc4afd1c/config.json
-
curl -L -o config.json https://huggingface.co/MU-NLPC/ner-gazetteers/resolve/4e5ea9601677926399571074b2e85916dc4afd1c/config.json
1.04 kB
| { | |
| "_name_or_path": "bettystr/NerRoB-czech", | |
| "architectures": [ | |
| "ExtendedEmbeddigsRobertaForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "finetuning_task": "ner", | |
| "gradient_checkpointing": false, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-PER", | |
| "2": "I-PER", | |
| "3": "B-ORG", | |
| "4": "I-ORG", | |
| "5": "B-LOC", | |
| "6": "I-LOC" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "B-LOC": 5, | |
| "B-ORG": 3, | |
| "B-PER": 1, | |
| "I-LOC": 6, | |
| "I-ORG": 4, | |
| "I-PER": 2, | |
| "O": 0 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 514, | |
| "model_type": "roberta", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "position_embedding_type": "absolute", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.33.2", | |
| "type_vocab_size": 1, | |
| "use_cache": true, | |
| "vocab_size": 51997 | |
| } | |