Instructions to use hf-internal-testing/tiny-random-GPT2ForTokenClassification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-GPT2ForTokenClassification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="hf-internal-testing/tiny-random-GPT2ForTokenClassification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-GPT2ForTokenClassification") model = AutoModelForTokenClassification.from_pretrained("hf-internal-testing/tiny-random-GPT2ForTokenClassification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from hf-internal-testing/tiny-random-GPT2ForTokenClassification: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/hf-internal-testing/tiny-random-GPT2ForTokenClassification/resolve/bb9a17d4a1098b0e45f99492321156f5a21d64ff/tokenizer_config.json
- Command line
-
hf download hf://hf-internal-testing/tiny-random-GPT2ForTokenClassification@bb9a17d4a1098b0e45f99492321156f5a21d64ff/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/hf-internal-testing/tiny-random-GPT2ForTokenClassification/resolve/bb9a17d4a1098b0e45f99492321156f5a21d64ff/tokenizer_config.json
769 Bytes
| { | |
| "add_bos_token": false, | |
| "add_prefix_space": false, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "errors": "replace", | |
| "model_max_length": 512, | |
| "name_or_path": "temp/dummy/gpt2/processors", | |
| "pad_token": null, | |
| "special_tokens_map_file": null, | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |