Instructions to use nlpproject/NER_distilBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nlpproject/NER_distilBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="nlpproject/NER_distilBERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("nlpproject/NER_distilBERT") model = AutoModelForTokenClassification.from_pretrained("nlpproject/NER_distilBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from nlpproject/NER_distilBERT: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/nlpproject/NER_distilBERT/resolve/main/config.json
- Command line
-
hf download hf://nlpproject/NER_distilBERT/config.json
-
curl -L -o config.json https://huggingface.co/nlpproject/NER_distilBERT/resolve/main/config.json
905 Bytes
| { | |
| "_name_or_path": "distilbert-base-uncased", | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForTokenClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-PER", | |
| "2": "I-PER", | |
| "3": "B-ORG", | |
| "4": "I-ORG", | |
| "5": "B-LOC", | |
| "6": "I-LOC", | |
| "7": "B-MISC", | |
| "8": "I-MISC" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "B-LOC": 5, | |
| "B-MISC": 7, | |
| "B-ORG": 3, | |
| "B-PER": 1, | |
| "I-LOC": 6, | |
| "I-MISC": 8, | |
| "I-ORG": 4, | |
| "I-PER": 2, | |
| "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, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.40.1", | |
| "vocab_size": 30522 | |
| } | |