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

Translation speed is to slow on HDD #74

Closed
ghost opened this issue Apr 1, 2021 · 5 comments
Closed

Translation speed is to slow on HDD #74

ghost opened this issue Apr 1, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Apr 1, 2021

Up to 8 sec on trying translate A4
I think, it would be nice to cache database indexes in the RAM as the argosmodels collection has about 1Gb summary.

@pierotofy pierotofy added enhancement New feature or request help wanted labels Apr 1, 2021
@ghost
Copy link
Author

ghost commented Apr 2, 2021

Now I understand, the issue mostly related to https://github.com/argosopentech/argos-translate engine as the LibreTranslate is web application based on that project. So maybe we need to close that question here or the engine is different from original version?

@pierotofy
Copy link
Member

Translation speed is dependent on argos-translate.

@PJ-Finlay
Copy link
Contributor

What do you mean by "cache database indexes in the RAM"? The majority of the time translation takes is performing the translation itself (longer for longer translations). CTranslate2 seems to be a pretty well optimized inference engine and we currently split sentences and then batch translate each one on its own core.

It's possible that preloading the models from disk into memory could speed things up but I'd want to see some evidence of a meaningful speed improvement before adding code complexity. If you're interested in looking into it I'd be curious to hear what you find.

@guillaumekln

@guillaumekln
Copy link

Disk speed only impacts the time it takes to load the model, or when the process is swapping on disk due to a lack of memory. Which one is it here?

@PJ-Finlay
Copy link
Contributor

I meant loading the model from disk to RAM to run inference on it. Argos Translate currently keeps models in memory once they've been used but that's to prevent memory leaks not for performance:

@dingedi dingedi closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants