Instructions to use dandankim/distilbert-ner-improved with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dandankim/distilbert-ner-improved with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="dandankim/distilbert-ner-improved")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("dandankim/distilbert-ner-improved") model = AutoModelForTokenClassification.from_pretrained("dandankim/distilbert-ner-improved", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from dandankim/distilbert-ner-improved: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/dandankim/distilbert-ner-improved/resolve/main/config.json
- Command line
-
hf download hf://dandankim/distilbert-ner-improved/config.json
-
curl -L -o config.json https://huggingface.co/dandankim/distilbert-ner-improved/resolve/main/config.json
1.44 kB
| { | |
| "_name_or_path": "distilbert-base-uncased", | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForTokenClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.2, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-BASE_TOKEN", | |
| "2": "I-BASE_TOKEN", | |
| "3": "B-QUOTE_TOKEN", | |
| "4": "I-QUOTE_TOKEN", | |
| "5": "B-ACTION", | |
| "6": "I-ACTION", | |
| "7": "B-ENTRY_PRICE", | |
| "8": "I-ENTRY_PRICE", | |
| "9": "B-TARGET_SELL_PRICE", | |
| "10": "I-TARGET_SELL_PRICE", | |
| "11": "B-CONTRACT_ADDRESS", | |
| "12": "I-CONTRACT_ADDRESS", | |
| "13": "B-STOPLOSS", | |
| "14": "I-STOPLOSS", | |
| "15": "B-LEVERAGE", | |
| "16": "I-LEVERAGE" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "B-ACTION": 5, | |
| "B-BASE_TOKEN": 1, | |
| "B-CONTRACT_ADDRESS": 11, | |
| "B-ENTRY_PRICE": 7, | |
| "B-LEVERAGE": 15, | |
| "B-QUOTE_TOKEN": 3, | |
| "B-STOPLOSS": 13, | |
| "B-TARGET_SELL_PRICE": 9, | |
| "I-ACTION": 6, | |
| "I-BASE_TOKEN": 2, | |
| "I-CONTRACT_ADDRESS": 12, | |
| "I-ENTRY_PRICE": 8, | |
| "I-LEVERAGE": 16, | |
| "I-QUOTE_TOKEN": 4, | |
| "I-STOPLOSS": 14, | |
| "I-TARGET_SELL_PRICE": 10, | |
| "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.48.3", | |
| "vocab_size": 30522 | |
| } | |