Closed kartikbhtt7 closed 4 months ago
The recent changes introduce support for fine-tuning the Whisper model within the training workflow. This includes adding a new class WhisperFineTuning
, updating import statements, modifying the train_model
function, and implementing necessary utility functions. The updates allow for dataset preparation, model loading, training, and evaluation specific to Whisper model fine-tuning, along with conditional handling in the caching logic.
File | Change Summary |
---|---|
workflow/training/__init__.py |
Added import for WhisperFineTuning to include the new module for Whisper fine-tuning. |
workflow/training/train.py |
Modified train_model to remove task.tokenized_dataset["test"] from trainer.evaluate() and added conditional in upload_cache for "whisper_finetuning". |
workflow/training/utils.py |
Updated get_task_class to include "whisper_finetuning": WhisperFineTuning . |
workflow/training/whisper.py |
Introduced the WhisperFineTuning class for handling Whisper model fine-tuning, including dataset loading, preparation, model setup, and training. |
sequenceDiagram
participant User
participant TrainingWorkflow
participant WhisperFineTuning
participant Model
participant HuggingFaceHub
User->>TrainingWorkflow: Initiate training
TrainingWorkflow->>WhisperFineTuning: Load Whisper task
WhisperFineTuning->>WhisperFineTuning: Load dataset
WhisperFineTuning->>WhisperFineTuning: Prepare data
WhisperFineTuning->>WhisperFineTuning: Load model and tokenizer
WhisperFineTuning->>Model: Fine-tune model
WhisperFineTuning->>TrainingWorkflow: Return trained model
TrainingWorkflow->>HuggingFaceHub: Push model
TrainingWorkflow->>User: Training complete
In the realm of Whisper's tune,
Fine-tuning dances to the moon.
Models train with data’s grace,
Metrics chase at swift embrace.
Whispered secrets now refined,
To the Hugging Face, aligned.
🌕✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Enhancements