Instructions to use nickbull/D5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nickbull/D5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="nickbull/D5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("nickbull/D5") model = AutoModelForTokenClassification.from_pretrained("nickbull/D5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from nickbull/D5: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/nickbull/D5/resolve/main/config.json
- Command line
-
hf download hf://nickbull/D5/config.json
-
curl -L -o config.json https://huggingface.co/nickbull/D5/resolve/main/config.json
1.3 kB
| { | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForTokenClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "bos_token_id": null, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-PERSON", | |
| "2": "I-PERSON", | |
| "3": "B-ORG", | |
| "4": "I-ORG", | |
| "5": "B-LOC", | |
| "6": "I-LOC", | |
| "7": "B-DATETIME", | |
| "8": "I-DATETIME", | |
| "9": "B-CODE", | |
| "10": "I-CODE", | |
| "11": "B-QUANTITY", | |
| "12": "I-QUANTITY", | |
| "13": "B-DEM", | |
| "14": "I-DEM", | |
| "15": "B-MISC", | |
| "16": "I-MISC" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "B-CODE": 9, | |
| "B-DATETIME": 7, | |
| "B-DEM": 13, | |
| "B-LOC": 5, | |
| "B-MISC": 15, | |
| "B-ORG": 3, | |
| "B-PERSON": 1, | |
| "B-QUANTITY": 11, | |
| "I-CODE": 10, | |
| "I-DATETIME": 8, | |
| "I-DEM": 14, | |
| "I-LOC": 6, | |
| "I-MISC": 16, | |
| "I-ORG": 4, | |
| "I-PERSON": 2, | |
| "I-QUANTITY": 12, | |
| "O": 0 | |
| }, | |
| "max_position_embeddings": 512, | |
| "model_type": "distilbert", | |
| "n_heads": 12, | |
| "n_layers": 6, | |
| "pad_token_id": 0, | |
| "qa_dropout": 0.1, | |
| "seq_classif_dropout": 0.2, | |
| "sinusoidal_pos_embds": false, | |
| "tie_weights_": true, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.1.0", | |
| "use_cache": false, | |
| "vocab_size": 30522 | |
| } | |