Technical Overview
Fine-tuning Whisper-Medium with standard sequence lengths on 16GB VRAM GPUs (like Tesla T4) regularly triggers Out-of-Memory (OOM) failures due to the size of the attention map allocations. Training requires aggressive memory optimizations to maintain a stable effective batch size.
Affected Modules
- File:
src/train.py (Line 110-140)
- System: VRAM allocations on 16GB GPUs.
Acceptance Criteria
- Continuous Execution: The training script completes the full 4000 steps without hitting CUDA OOM constraints.
- Stable Batch Representation: Maintains an effective batch size of 16 using gradient accumulation without exceeding 13GB VRAM allocation.
- Optimized Throughput: Minimizes VRAM allocation while maximizing samples processed per second.
Proposed Implementation Approach
- Enable
gradient_checkpointing=True to reconstruct the backward pass activations dynamically, saving substantial forward pass memory.
- Pin training parameters to
fp16=True mixed precision.
- Enforce 8-bit quantization mapping in combination with LoRA parameters target modules (
q_proj, v_proj).
- Set parameter configurations:
per_device_train_batch_size=4 paired with gradient_accumulation_steps=4.
Severity & Priority
- Severity: High (Limits model scaling and training stability)
- Priority: P1
Technical Overview
Fine-tuning Whisper-Medium with standard sequence lengths on 16GB VRAM GPUs (like Tesla T4) regularly triggers Out-of-Memory (OOM) failures due to the size of the attention map allocations. Training requires aggressive memory optimizations to maintain a stable effective batch size.
Affected Modules
src/train.py(Line 110-140)Acceptance Criteria
Proposed Implementation Approach
gradient_checkpointing=Trueto reconstruct the backward pass activations dynamically, saving substantial forward pass memory.fp16=Truemixed precision.q_proj,v_proj).per_device_train_batch_size=4paired withgradient_accumulation_steps=4.Severity & Priority