Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch processing #1

Merged
merged 14 commits into from
Dec 9, 2022
Merged

Batch processing #1

merged 14 commits into from
Dec 9, 2022

Conversation

Blair-Johnson
Copy link
Owner

@Blair-Johnson Blair-Johnson commented Dec 8, 2022

Opening PR for merging and conflict resolution. The batch-processing branch introduces a single major modification to the behavior of the model.transcribe() method, which can now accept a list of audio file paths rather than a single audio file path. These files are packed into the batch dimension of the model for transcription, allowing users to achieve better GPU utilization. Audio clips can be different lengths and the internal batch size will be reduced as the transcription of sorter files is completed.

Remaining issues to address:

  • Test behavior of different transcription options for failure
  • Modify docstring of batch_transcribe method to reflect modifications
  • Verify behavior of decode options for different clips
  • Include some benchmarking results

@Blair-Johnson
Copy link
Owner Author

Blair-Johnson commented Dec 8, 2022

Initial benchmarking indicates that batching enables significantly sub-linear scaling at least until batch_size=16 on a NVIDIA A100 80GB. Batching remains "sub-linear" with respect to batch_size=1 afterward, but the time required for a set of batched audio clips begins scaling linearly with additional increases in batch size as the GPU becomes saturated. In this figure, a 214min podcast was batched together with itself for different batch sizes in {1,2,4,8,16} and transcribed in-parallel. The linear reference assumes linear scaling with respect to the batch_size=1 case and is analogous to running consecutive clips serially.

image

@Blair-Johnson Blair-Johnson merged commit fb6159b into main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant