Closed wsnooker closed 7 years ago
What is the performance difference you get between CTranslate and translate.lua
? When compiled in Release
mode it should as fast or faster than translate.lua
on the same CPU model.
The n_best
option is known feature request and there is plans to add it but no expected release time. Hopefully I can take a look at adding it this week.
The elapsed time is 1.5 second in compiled Release mode, while the translate.lua
takes 1 second for the same sentence.
How do you measure that and what is your model configuration?
Just translate one sentence and print the elapsed time. The model configuration is : wordvec-500, rnnHiddenSize-1000, vocabSize-50k, and just one rnn layer.
Are you also measuring model loading time?
To make a fair comparison, you should duplicate your sentence like 100 or 200 times and use the -time
option (--time
for CTranslate) to output the average translation time.
Thanks, performance works fine when testing in another server machine. Maybe the server lacks sufficient memory in previous one.
But if we run translate.lua with GPU, C++ translator is way slower right?
Of course. GPUs are still an order of magnitude faster than CPUs.
The performance of using
CTranslate
is not as good asTranslate.lua
. Are there any tips i missed in converting GPU model to CPU model?Another request, I want to get the n_best and its corresponding score. But now the demo lacks these apis, do you have any plans for creating them?