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")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration") model = AutoModelForSpeechSeq2Seq.from_pretrained("onnx-internal-testing/tiny-random-GraniteSpeechForConditionalGeneration") - Notebooks
- Google Colab
- Kaggle
| { | |
| "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 %}" | |
| } |