Instructions to use hf-tiny-model-private/tiny-random-CanineForQuestionAnswering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-tiny-model-private/tiny-random-CanineForQuestionAnswering with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="hf-tiny-model-private/tiny-random-CanineForQuestionAnswering")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("hf-tiny-model-private/tiny-random-CanineForQuestionAnswering") model = AutoModelForQuestionAnswering.from_pretrained("hf-tiny-model-private/tiny-random-CanineForQuestionAnswering", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from hf-tiny-model-private/tiny-random-CanineForQuestionAnswering: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/hf-tiny-model-private/tiny-random-CanineForQuestionAnswering/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://hf-tiny-model-private/tiny-random-CanineForQuestionAnswering/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/hf-tiny-model-private/tiny-random-CanineForQuestionAnswering/resolve/main/tokenizer_config.json
1.29 kB
| { | |
| "add_prefix_space": false, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": { | |
| "__type": "AddedToken", | |
| "content": "", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "mask_token": { | |
| "__type": "AddedToken", | |
| "content": "", | |
| "lstrip": true, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "model_max_length": 512, | |
| "pad_token": { | |
| "__type": "AddedToken", | |
| "content": "\u0000", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "__type": "AddedToken", | |
| "content": "", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "special_tokens_map_file": "/home/runner/.cache/huggingface/hub/models--google--canine-s/snapshots/731b77c59a31a88fa2ed1812e88ca214ec2877b8/special_tokens_map.json", | |
| "tokenizer_class": "CanineTokenizer" | |
| } | |