~/talk

Speeding up Whisper for speech recognition by 10x - Optimisations and walkthrough

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [machine-learning, python]
slides:none on file

Claims a 10x speedup by combining engineering tricks and model changes and shows measured timings: a 10-minute sample runs in ~62s with fp16 baseline, ~60s using flash attention/SDPA, ~37.9s with speculative decoding, chunked batching can be 43.8s (worse with speculative in batches), and a distilled model plus fp16+SDPA+chunking hits ~17.2s. Uses Torch.compile/attention kernels, torchaudio preprocessing, chunking/batching, quantization paths (Q4/Q8) and recommends FlashAttention2 on modern GPUs.

AI-written summary · about

  1. 0:00Introduction to whisper
  2. 3:00Why optimize whisper
  3. 4:25Measuring performance
  4. 5:41Initial optimization: fp16
  5. 7:40Demo: fp16 implementation
  6. 10:46Flash attention 2
  7. 14:12Demo: sdpa implementation
  8. 16:26Speculative decoding
  9. 21:38Demo: speculative decoding
  10. 23:32Parallel audio chunking
  11. 25:42Demo: parallel chunking
  12. 28:04Distil-whisper model
  13. 30:56Distil-whisper demo
  14. 33:23Summary and takeaways
  15. 35:24Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.