Instructions to use ILRDF/whisper-large-v2-formosan-all with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ILRDF/whisper-large-v2-formosan-all with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="ILRDF/whisper-large-v2-formosan-all")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("ILRDF/whisper-large-v2-formosan-all") model = AutoModelForSpeechSeq2Seq.from_pretrained("ILRDF/whisper-large-v2-formosan-all") - Notebooks
- Google Colab
- Kaggle
Model Card for whisper-large-v2-formosan-all
This model is a fine-tuned version of the Taiwanese indigenous openai/whisper-large-v2.
Note: we use indonesian as whisper language id
Training process
The training of the model was performed with the following hyperparameters
- Batch size: 2*4 (on 4 L40s GPU)
- Gradient accumulation steps: 64
- Total steps: 4146
- Learning rate: 5e-4
- Data augmentation: No
- Optimizer: schedule_free_radam
- LR scheduler type: constant
How to use
import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "formospeech/whisper-large-v2-formosan-all"
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
)
model.to(device)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
max_new_tokens=128,
chunk_length_s=30,
batch_size=16,
torch_dtype=torch_dtype,
device=device,
)
generate_kwargs = {"language": "id"}
transcription = pipe("path/to/my_audio.wav", generate_kwargs=generate_kwargs)
print(transcription)
- Downloads last month
- 102
Model tree for ILRDF/whisper-large-v2-formosan-all
Base model
openai/whisper-large-v2