iTranslated by AI
A Post-Mortem Report: The Hell of Running faster-whisper large-v3 on an Old GPU
🛠 My Environment
For starters, I'll list my current setup.
- NVIDIA GTX 1660 SUPER
- faster-whisper 1.1.1 model: large-v3
- CUDA 12.3
- cuDNN 8.9.6
❌ Conclusion: Just Don't
Running large-v3 on a GTX 1660 SUPER is as reckless as flying a jet without a license. Just don't do it.
Just stick to the openai/whisper turbo model. It's much more stable. Save yourself before you start losing hair from the stress.
🚗 The Trial and Error Route
Putting the conclusion aside, I'll document what I found out after trying it anyway.
📌 Installing faster-whisper
You can just follow the instructions in the official faster-whisper repository.
pip install faster-whisper
However, this requires the cuDNN 9.x series, so it doesn't work in my environment.
Of course, I tried downloading and installing cuDNN 9.8.0 as an experiment. It didn't work properly.
To run faster-whisper with CUDA 12 and cuDNN 8, you need to downgrade the CTranslate2 version by running the following command:
pip install --force-reinstall ctranslate2==4.4.0
📌 Running faster-whisper
Once you've reached this point, it should work as long as you follow the samples in the official repository.
from faster_whisper import WhisperModel
model_size = "large-v3"
# Run on GPU with FP16
model = WhisperModel(model_size, device="cuda", compute_type="float16")
segments, info = model.transcribe("audio.mp3", beam_size=5)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
for segment in segments:
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
However, the model loading is incredibly slow.
You might think it's only for the first time?
Nope. It's slow every single time. It feels like it takes about five minutes.
The issue is with this line:
WhisperModel(model_size, device="cuda", compute_type="float16")
It's so slow that you'd think it's fetching the model from the network every time. After much agonizing, I found a solution.
Here it is:
WhisperModel(model_size, device="cuda", compute_type="float16", local_files_only=True)
I added local_files_only=True to the WhisperModel constructor.
By doing this, some kind of check is bypassed, and the model cached on the local PC is loaded directly.
The loading speed became lightning-fast. Fantastic!
📌 New Issues
Full of joy, I immediately tried to integrate it into my app.
Forgive the self-promotion, but I rewrote the openai/whisper part of an app I made myself to use faster-whisper and ran it. Here is the original app:
It worked. Well, it worked in the sense that it ran.
However, after the process_transcription_files function (the speech recognition function) finished, the program would just terminate without even returning to the caller.
It wasn't even caught by exception handling.
What the heck?
I asked an AI and tried several countermeasures, but in the end, nothing worked.
Setting device="cpu" or changing the model_size to "small" stopped the issue from occurring, but those options aren't practical.
Presumably, the GPU memory is insufficient for handling the large model. I don't know for sure, though.
Ultimately, since I had already spent a lot of time getting to this point, I gracefully gave up.
📝 Summary
And that brings us back to the initial conclusion.
Running large-v3 on a GTX 1660 SUPER is as reckless as flying a jet without a license. Just don't do it.
Just stick to the openai/whisper turbo model. It's much more stable. Save yourself before you start losing hair from the stress.
✉️ P.S. To my future self.
"Don't try to run huge models on a cheap GPU."
Got it? Never again.
Discussion