Instructions to use onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration") model = AutoModelForMultimodalLM.from_pretrained("onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration: direct link, hf CLI and curl.
- Browser
- Download file 646 Bytes
-
https://huggingface.co/onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration/resolve/main/tokenizer_config.json
646 Bytes
| { | |
| "add_prefix_space": false, | |
| "backend": "tokenizers", | |
| "bos_token": "<|end_of_text|>", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|end_of_text|>", | |
| "errors": "replace", | |
| "is_local": false, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<|pad|>", | |
| "padding_side": "left", | |
| "processor_class": "GraniteSpeechProcessor", | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": "<|unk|>", | |
| "chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}USER: {{ message['content'] }}\n ASSISTANT:{% elif message['role'] == 'assistant' %}{{ message['content'] }}{% endif %}{% endfor %}" | |
| } |