transformers
45d273d5 - 📚 docs(granite-speech): add comprehensive usage examples (#42125)

Commit
58 days ago
📚 docs(granite-speech): add comprehensive usage examples (#42125) * 📚 docs(granite-speech): add comprehensive usage examples Resolves the TODO (@alex-jw-brooks) by adding complete usage documentation for Granite Speech model now that it's released and compatible with transformers. Added examples for: - Basic speech transcription - Speech-to-text with additional context - Batch processing multiple audio files - Tips for best results (audio format, LoRA adapter, memory optimization) This helps users get started with the Granite Speech multimodal model by providing practical, copy-paste-ready code examples for common use cases. Replaces TODO comment on line 44 with ~100 lines of comprehensive documentation following the patterns used in other multimodal model docs. * Address review feedback: add chat template usage and move model-specific tips - Added proper chat template formatting in the second example (per @zucchini-nlp feedback) - Removed generic LLM tips (temperature, batch size, memory) - Moved Granite Speech-specific tips (audio format, LoRA adapter) to Usage tips section This keeps the documentation focused on model-specific features rather than general LLM knowledge. * docs: use datasets library for working audio examples Address review feedback by replacing placeholder audio paths with real examples using hf-internal-testing/librispeech_asr_dummy dataset. This makes all code examples copy-paste ready and reproducible. - Add datasets import to all three examples - Replace 'path/to/audio.wav' with actual dataset loading - Ensure proper audio sampling rate handling Co-authored-by: eustlb <eustache.leblond@gmail.com> * 📚 docs: use modern chat template pattern with tokenize=True for audio --------- Co-authored-by: eustlb <eustache.leblond@gmail.com>
Author
Parents
Loading