Add distil models to WhisperModel init and download_model docstrings (#847)

* chore: add distil models to WhisperModel init docstring and download_model docstring
This commit is contained in:
Napuh
2024-05-20 03:51:22 +02:00
committed by GitHub
parent 4acdb5c619
commit f53be1e811
2 changed files with 5 additions and 3 deletions

View File

@@ -100,7 +100,8 @@ class WhisperModel:
Args: Args:
model_size_or_path: Size of the model to use (tiny, tiny.en, base, base.en, model_size_or_path: Size of the model to use (tiny, tiny.en, base, base.en,
small, small.en, medium, medium.en, large-v1, large-v2, large-v3, or large), a path to a small, small.en, distil-small.en, medium, medium.en, distil-medium.en, large-v1,
large-v2, large-v3, large, distil-large-v2 or distil-large-v3), a path to a
converted model directory, or a CTranslate2-converted Whisper model ID from the HF Hub. converted model directory, or a CTranslate2-converted Whisper model ID from the HF Hub.
When a size or a model ID is configured, the converted model is downloaded When a size or a model ID is configured, the converted model is downloaded
from the Hugging Face Hub. from the Hugging Face Hub.

View File

@@ -54,8 +54,9 @@ def download_model(
Args: Args:
size_or_id: Size of the model to download from https://huggingface.co/Systran size_or_id: Size of the model to download from https://huggingface.co/Systran
(tiny, tiny.en, base, base.en, small, small.en medium, medium.en, large-v1, large-v2, (tiny, tiny.en, base, base.en, small, small.en, distil-small.en, medium, medium.en,
large-v3, large), or a CTranslate2-converted model ID from the Hugging Face Hub distil-medium.en, large-v1, large-v2, large-v3, large, distil-large-v2,
distil-large-v3), or a CTranslate2-converted model ID from the Hugging Face Hub
(e.g. Systran/faster-whisper-large-v3). (e.g. Systran/faster-whisper-large-v3).
output_dir: Directory where the model should be saved. If not set, the model is saved in output_dir: Directory where the model should be saved. If not set, the model is saved in
the cache directory. the cache directory.