I’m having similar issues, so here’s a quick benchmark.
Update: what I’m doing wrong is subscribing to a sub-par service, apparently. I tried a digitalocean VPS with 1 shared AMD cpu and the same test takes 2 seconds instead.
I have a VPS with 2 cores and ~3GB RAM. When translating this text from german:
Die Hermannschule arbeitet seit Jahren an einem tragfähigen Medienkonzept, das ihren Besonderheiten und ihren besonderen Bedürfnissen gerecht wird. Ein Beispiel: Unsere Klassenräume sind längst mit interaktiven Tafeln ausgestattet.
my instance takes ~12 seconds to translate it. Both cores are at 100% during that time, and the RAM usage barely changes.
I don’t think RAM is the issue, but the power of the CPU.
This VPS is probably kind of weak, I have no idea on how to measure it, but here’s some info from /proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : QEMU Virtual CPU version 2.5+
stepping : 3
microcode : 0x1
cpu MHz : 2399.996
cache size : 16384 KB
bogomips : 4799.99
For reference, I’m running it like this:
podman run --rm -it -p 5000:5000 docker.io/libretranslate/libretranslate
Yes same conclusions, to translate quickly you need an instance with a good CPU.
I tried a host with 2,4,8 cores of a basic CPU (for reference: Intel® Xeon® E5-2690v3) and nothing changed, translations were slow.
You really need a good cpu to have fast translations