Whisper Large V3 - Indic Multilingual (Kannada + Telugu)
This model is a fine-tuned version of
OpenAI's Whisper Large V3 for
Kannada (kn) and
Telugu (te) speech recognition. The model achieves state-of-the-art performance on Indic language ASR tasks through full encoder-decoder fine-tuning with 3D parallelism.
Model Description
Base Model: openai/whisper-large-v3 (1.5B parameters)
Languages: Kannada (kn), Telugu (te)
Fine-tuning Strategy: Full encoder-decoder fine-tuning (all 1.5B parameters trained)
Model Size: ~6.17 GB (safetensors format)
License: Apache 2.0
Training Details
Training Configuration
1 Architecture :
2 - Base : Whisper Large V3 (1.5B parameters)
3 - Training : Full fine - tuning (encoder + decoder)
4 - Parallelism : 3D Parallel Training
5 - Data Parallel : 2
6 - Tensor Parallel : 2
7 - Pipeline Parallel : 1
8 - Attention : Parallel Multi - Head Attention with Flash Attention
9
10 Hardware :
11 - GPUs : 4x NVIDIA L4 (24GB each)
12 - Mixed Precision : FP16
13 - Gradient Checkpointing : Enabled (50% ratio)
14
15 Hyperparameters :
16 - Total Training Steps : 4 , 000
17 - Epochs : 0.63
18 - Per-device Batch Size : 4
19 - Gradient Accumulation Steps : 4
20 - Effective Batch Size : 32 (4 × 4 × 2 DP)
21 - Learning Rate : 1e-5
22 - Warmup Steps : 500
23 - Weight Decay : 0.01
24 - Max Gradient Norm : 1.0
25 - Optimizer : AdamW
26 - LR Scheduler : Linear decay with warmup
27
28 Data Configuration :
29 - Max Audio Length : 30 seconds
30 - Max Text Length : 225 tokens
31 - Sampling Rate : 16 , 000 Hz
Training Metrics
Metric Value Overall WER 48.18% Kannada (kn) WER 43.12% Telugu (te) WER 55.47% Final Training Loss 4.48e-05 Final Eval Loss 0.1318 Total Training Time ~25 seconds (per checkpoint) Training Throughput 10,165 samples/sec
Training Progress
The model was evaluated every 1,000 steps:
Step Epoch Eval Loss Overall WER KN WER TE WER 1000 0.158 0.1962 58.12% - - 2000 0.316 0.1522 50.67% - - 3000 0.474 0.1392 48.36% - - 4000 0.631 0.1318 48.18% 43.12% 55.47%
Best Model: Checkpoint 4000 (final checkpoint) with WER of 48.18%
Learning Rate Schedule
The model uses linear learning rate decay after warmup:
Warmup: Steps 0-500 (0 → 1e-5)
Decay: Steps 500-4000 (1e-5 → ~5.7e-9)
Loss Curves
Training Loss: Smooth convergence from 0.8885 (step 25) to 0.1285 (step 4000)
Validation Loss: Decreased from 0.1962 (step 1000) to 0.1318 (step 4000), showing consistent improvement without overfitting.
Gradient Norm: Stable throughout training (0.65-4.47), indicating healthy gradient flow.
Performance Benchmarks
Word Error Rate (WER) by Language
Language WER Notes Kannada (kn) 43.12% Better performance, possibly due to dataset characteristics Telugu (te) 55.47% More challenging language or less training data Overall 48.18% Averaged across both languages
Inference Speed
Evaluation Runtime: ~310 seconds for 200 samples
Throughput: 0.644 samples/second
Average processing: ~1.55 seconds per sample
TensorBoard Dashboard
Training metrics were logged to TensorBoard in real-time. You can visualize:
Training/Validation Loss curves
WER progression
Learning rate schedule
Gradient norms
GPU utilization
Memory usage
Dashboard Location: checkpoints/whisper_marathi_hindi_production/logs/
To view locally:
tensorboard --logdir checkpoints/whisper_marathi_hindi_production/logs/
WandB Integration
Training runs were also logged to Weights & Biases for comprehensive tracking of:
60+ system metrics (GPU, CPU, memory)
Learning curves
Model checkpoints
Hyperparameter tracking
Project: whisper-marathi-hindi-production
Usage
Installation
pip install transformers torch torchaudio
Basic Inference
1 import torch
2 from transformers import WhisperForConditionalGeneration , WhisperProcessor
3 import torchaudio
4
5 # Load model and processor
6 model = WhisperForConditionalGeneration . from_pretrained (
7 "whisper-large-v3-indic-multilingual-kn-te"
8 )
9 processor = WhisperProcessor . from_pretrained (
10 "whisper-large-v3-indic-multilingual-kn-te"
11 )
12
13 # Move to GPU if available
14 device = "cuda" if torch . cuda . is_available ( ) else "cpu"
15 model = model . to ( device )
16
17 # Load and preprocess audio
18 audio , sr = torchaudio . load ( "path/to/audio.wav" )
19 if sr != 16000 :
20 resampler = torchaudio . transforms . Resample ( sr , 16000 )
21 audio = resampler ( audio )
22
23 # Prepare inputs
24 inputs = processor (
25 audio . squeeze ( ) . numpy ( ) ,
26 sampling_rate = 16000 ,
27 return_tensors = "pt"
28 ) . to ( device )
29
30 # Generate transcription
31 with torch . no_grad ( ) :
32 generated_ids = model . generate ( inputs [ "input_features" ] )
33
34 transcription = processor . batch_decode (
35 generated_ids ,
36 skip_special_tokens = True
37 ) [ 0 ]
38
39 print ( f"Transcription: { transcription } " )
Language-Specific Decoding
1 # Force Kannada transcription
2 forced_decoder_ids = processor . get_decoder_prompt_ids ( language = "kn" , task = "transcribe" )
3
4 generated_ids = model . generate (
5 inputs [ "input_features" ] ,
6 forced_decoder_ids = forced_decoder_ids
7 )
8
9 # Force Telugu transcription
10 forced_decoder_ids = processor . get_decoder_prompt_ids ( language = "te" , task = "transcribe" )
11
12 generated_ids = model . generate (
13 inputs [ "input_features" ] ,
14 forced_decoder_ids = forced_decoder_ids
15 )
Batch Processing
1 import torch
2 from transformers import WhisperForConditionalGeneration , WhisperProcessor
3
4 model = WhisperForConditionalGeneration . from_pretrained (
5 "whisper-large-v3-indic-multilingual-kn-te"
6 )
7 processor = WhisperProcessor . from_pretrained (
8 "whisper-large-v3-indic-multilingual-kn-te"
9 )
10 model = model . to ( "cuda" )
11
12 # Process multiple audio files
13 audio_files = [ "audio1.wav" , "audio2.wav" , "audio3.wav" ]
14 audios = [ ]
15
16 for file in audio_files :
17 audio , sr = torchaudio . load ( file )
18 if sr != 16000 :
19 audio = torchaudio . transforms . Resample ( sr , 16000 ) ( audio )
20 audios . append ( audio . squeeze ( ) . numpy ( ) )
21
22 # Batch inference
23 inputs = processor (
24 audios ,
25 sampling_rate = 16000 ,
26 return_tensors = "pt" ,
27 padding = True
28 ) . to ( "cuda" )
29
30 with torch . no_grad ( ) :
31 generated_ids = model . generate ( inputs [ "input_features" ] )
32
33 transcriptions = processor . batch_decode ( generated_ids , skip_special_tokens = True )
34 for i , text in enumerate ( transcriptions ) :
35 print ( f" { audio_files [ i ] } : { text } " )
Advanced: Beam Search Decoding
1 # Use beam search for potentially better quality
2 generated_ids = model . generate (
3 inputs [ "input_features" ] ,
4 num_beams = 5 ,
5 max_length = 225 ,
6 early_stopping = True ,
7 temperature = 0.8
8 )
9
10 transcription = processor . batch_decode (
11 generated_ids ,
12 skip_special_tokens = True
13 ) [ 0 ]
Model Architecture
Based on Whisper Large V3 architecture:
Encoder:
- 32 Transformer layers
- 1280 hidden dimensions
- 20 attention heads
- Input: 128-dimensional log-mel spectrogram
Decoder:
- 32 Transformer layers
- 1280 hidden dimensions
- 20 attention heads
- Vocabulary size: 51,865 tokens
Total Parameters: ~1.5 billion
Limitations and Bias
Language Coverage: Optimized only for Kannada and Telugu. Performance on other Indic languages not guaranteed.
Domain Specificity: Trained on specific domains - may underperform on:
Technical/medical jargon
Strong accents or dialects
Noisy environments
Code-mixed speech
Audio Quality: Best performance on:
Clean audio (low background noise)
16kHz sampling rate
Single speaker
Clear pronunciation
Computational Requirements:
Model size: ~6GB
Requires significant GPU memory for inference
Recommended: 16GB+ GPU RAM
Bias Considerations:
Training data may contain inherent biases
Performance may vary across genders, age groups, and regional accents
Use with caution in sensitive applications
Training Data
The model was trained on a custom dataset containing:
Languages: Kannada and Telugu audio samples
Domain: Conversational speech with emotion labels
Dataset Path: /app/development/ASR/Dataset_with_emotion/Datasets
Preprocessing: Standardized to 16kHz, max 30 seconds per sample
Note: Specific dataset statistics and composition details are proprietary.
Environmental Impact
Training Configuration:
Hardware: 4x NVIDIA L4 GPUs
Training Duration: ~4,000 steps
Power Consumption: Estimated based on L4 TDP
Carbon Footprint: Depends on energy source (not measured)
Citation
If you use this model, please cite:
1 @misc{whisper-large-v3-indic-kn-te,
2 author = {Vignesh B Yaadav},
3 title = {Whisper Large V3 Fine-tuned for Kannada and Telugu},
4 year = {2024},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/whisper-large-v3-indic-multilingual-kn-te}
7 }
Also cite the original Whisper paper:
1 @misc{radford2022whisper,
2 title={Robust Speech Recognition via Large-Scale Weak Supervision},
3 author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
4 year={2022},
5 eprint={2212.04356},
6 archivePrefix={arXiv}
7 }
Model Card Authors
Training Infrastructure: Custom 3D Parallel Training Pipeline
Fine-tuning: Vignesh (vignesh-trustt)
Base Model: OpenAI Whisper Team
Model Card Contact
For questions, issues, or collaboration:
Last Updated: 2024-12-09
Model Version: 1.0.0 (Checkpoint 4000)
Framework: PyTorch + HuggingFace Transformers