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

Why is GGML so much faster than PyTorch? #382

Closed
wizardforcel opened this issue Jul 13, 2023 · 2 comments
Closed

Why is GGML so much faster than PyTorch? #382

wizardforcel opened this issue Jul 13, 2023 · 2 comments

Comments

@wizardforcel
Copy link
Contributor

wizardforcel commented Jul 13, 2023

Test data on my computer, with TR-3970x and RTX3080Ti

Whisper Medium+PyTorch CPU:

Takes 3 hours for audio per hour

Whisper Medium+PyTorch GPU:

10 min per hour

Whisper Large V2+GGML CPU:

30 min per hour

@gordicaleksa
Copy link

  1. Are you sure you're running the models with the same hyperparams? (beam size, etc.)
  2. GGML is bare bone, "close to metal" (written in C), hence more optimal but less developer friendly which is a necessary tradeoff Georgi had to make

@ggerganov
Copy link
Owner

Yes, it's most likely due to different beam size, greedy vs beam-search decoder, etc.
If you match the parameters 1-to-1 then it is not much faster. Should be comparable

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

No branches or pull requests

3 participants