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

Limit transcription CPU threads #6467

Open
JohnXLivingston opened this issue Jul 5, 2024 · 3 comments
Open

Limit transcription CPU threads #6467

JohnXLivingston opened this issue Jul 5, 2024 · 3 comments

Comments

@JohnXLivingston
Copy link
Contributor

Describe the problem to be solved

v6.2.0-RC1 comes with an incredible feature: automatic subtitles generation.

But the models that are used can use a lot of CPU and RAM.
I did not see any option to limit their usage (as we can with video transcoding).

Describe the solution you would like

Would it be possible to add some options?

@Chocobozzz
Copy link
Owner

I don't think we can limit RAM but CPU yes there is a threads option

  --threads THREADS     number of threads used for CPU inference (default: 0)

@Chocobozzz Chocobozzz changed the title New transcription feature: is it possible to limit CPU and RAM usage? Limit transcription CPU threads Jul 10, 2024
@lutangar
Copy link
Contributor

RAM usage largely depends on model size since it must be loaded to RAM (multiplied by the number of runners since models aren't shared in memory).

For example with whisper-ctranslate2 (which uses faster-whisper which is CPU friendly) the models tend to be larger than the one provided for openai-whisper :

  • large-v3 ~3GB
  • medium ~1.5GB
  • tiny ~75MB

Of course, transcript quality will get worse the further you decrease the size.

https://huggingface.co/Systran

@JohnXLivingston
Copy link
Contributor Author

Thanks for the information @lutangar ! Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants