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 I found that the generation of embedding is very slow? #110

Open
zhuchenxi opened this issue Nov 26, 2019 · 4 comments
Open

Why I found that the generation of embedding is very slow? #110

zhuchenxi opened this issue Nov 26, 2019 · 4 comments

Comments

@zhuchenxi
Copy link

I found that in CPU mode, the speed of the generation of embedding is about 26 sentences per hour. Is that slow or normal?

@hoschwenk
Copy link
Contributor

I haven't done speed test on CPU, but 26 sentences per hour is definitely by way too slow.
Are yo using multiple threads and bunch mode ?

@hoschwenk
Copy link
Contributor

Any new insights ?

@ShunChi100
Copy link

I found that setting max_sentences to some an int number helps, e.g. 128 (depending on your GPU memory) in the SentenceEncoder(). Otherwise, SentenceEncoder() treat one sentence as one batch.

@ericmclachlan
Copy link

@hoschwenk : I'm fairly new to using LASER (which is awesome!). You mention multiple threads and bunch mode... Is there any documentation you can point me to help me take advantage of these features? The FLASK API provided by the docker deployment seems to be strictly single-threaded.
TIA

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

4 participants