Instructions to use dandankim/distilbert-token-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dandankim/distilbert-token-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="dandankim/distilbert-token-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("dandankim/distilbert-token-classifier") model = AutoModelForTokenClassification.from_pretrained("dandankim/distilbert-token-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from dandankim/distilbert-token-classifier: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/dandankim/distilbert-token-classifier/resolve/main/config.json
- Command line
-
hf download hf://dandankim/distilbert-token-classifier/config.json
-
curl -L -o config.json https://huggingface.co/dandankim/distilbert-token-classifier/resolve/main/config.json
1.57 kB
| { | |
| "_name_or_path": "FacebookAI/roberta-base", | |
| "architectures": [ | |
| "RobertaForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "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, | |
| "intermediate_size": 3072, | |
| "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 | |
| }, | |
| "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.48.3", | |
| "type_vocab_size": 1, | |
| "use_cache": true, | |
| "vocab_size": 50265 | |
| } | |