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

Slower than openai whisper with my gpu #181

Closed
tuotuoshao opened this issue Feb 23, 2024 · 2 comments
Closed

Slower than openai whisper with my gpu #181

tuotuoshao opened this issue Feb 23, 2024 · 2 comments

Comments

@tuotuoshao
Copy link

Env
device: A30
model version: large-v2
cuda version: cuda11

Measurement
for 57min audio
openai costs 450s
whisper-jax costs 400s

for 90s audio
openai costs 20s
whisper-jax costs 38s

for 2s audio
openai costs 1s
whisper-jax costs 5s

All my measurement are the second infefence.
Only if the audio’s duration is large enough, jax is faster but the increase is less then 10%. When processing short audio, jax is several times slower than openai.

Code config:
openai config:
model = whisper.load_model("large-v2")
whisper-jax config:
pipeline = FlaxWhisperPipline("openai/whisper-large-v2", dtype=jnp.float16, batch_size=16)

@ewwink
Copy link

ewwink commented Mar 10, 2024

try batch_size=1 or whatever number of GPU you have

@flexchar
Copy link

This is normal if your batch is small then there isn't room for a win. I wouldn't call it an issue. :)

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