Instructions to use SlayerLab/NERGAL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SlayerLab/NERGAL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="SlayerLab/NERGAL")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("SlayerLab/NERGAL") model = AutoModelForTokenClassification.from_pretrained("SlayerLab/NERGAL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download names/config.json from SlayerLab/NERGAL: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/SlayerLab/NERGAL/resolve/main/names/config.json
- Command line
-
hf download hf://SlayerLab/NERGAL/names/config.json
-
curl -L -o config.json https://huggingface.co/SlayerLab/NERGAL/resolve/main/names/config.json
1.38 kB
| { | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": null, | |
| "classifier_dropout": 0.1, | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-PERSON", | |
| "2": "I-PERSON", | |
| "3": "B-PERSON_F", | |
| "4": "I-PERSON_F", | |
| "5": "B-PERSON_L", | |
| "6": "I-PERSON_L", | |
| "7": "B-ORG", | |
| "8": "I-ORG", | |
| "9": "B-STREET", | |
| "10": "I-STREET", | |
| "11": "B-CITY", | |
| "12": "I-CITY" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "is_decoder": false, | |
| "label2id": { | |
| "B-CITY": 11, | |
| "B-ORG": 7, | |
| "B-PERSON": 1, | |
| "B-PERSON_F": 3, | |
| "B-PERSON_L": 5, | |
| "B-STREET": 9, | |
| "I-CITY": 12, | |
| "I-ORG": 8, | |
| "I-PERSON": 2, | |
| "I-PERSON_F": 4, | |
| "I-PERSON_L": 6, | |
| "I-STREET": 10, | |
| "O": 0 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 514, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "position_embedding_type": "absolute", | |
| "tie_word_embeddings": true, | |
| "tokenizer_class": "HerbertTokenizerFast", | |
| "transformers_version": "5.12.1", | |
| "type_vocab_size": 2, | |
| "use_cache": false, | |
| "vocab_size": 50000 | |
| } | |