I am trying to use text to produce text embeddings for nearly 700,000 items. Eventually, I am using the text embeddings to compute semantic similarity norms with textSimiliaryNorm. I don't store the text embedding, as this would require a lot of storage space, so it's just an interim step to calculating my text similarity norms.
where comments is a vector of a certain batch size.
Running this in batch sizes of 1,000 items (comments), takes about 30 minutes on my laptop (8-Core Macbook Pro, 32MB RAM). To try and speed up this process, I have tried running the same procedure on an Amazon Web Services instance with a GPU. However, there doesn't appear to be a performance gain, despite the fact that I can confirm the GPU is being used when I run textEmbed:
(I also don't get the warning from text saying that CUDA is not being used, whereas I do on my laptop).
This 1077MB seems to be an upper bound on GPU usage, whether I change the batch size or get a bigger server with more GPU or CPU power.
The CPU usage is maxing out (100%), effectively, with whatever batch size I use. I have even tried a g3.8xlarge instance instance with 244 GB CPU memory. Again, the CPU is getting maxed out at 100% and the GPU is stuck on 1,077 MB usage, when textEmbed is being run. (Hence), I can't improve the processing times I get on my laptop, even though I am throwing way more power at the same processes.
Do you have any idea why I am not experiencing any performance improvement? Please let me know if I can provide more information.
All my code is working fine (I get the text similarity norms I want at the end), I just need performance improvements. FYI: I am running my code interactively in the R terminal of the server (or RStudio on my laptop).
I am trying to use
text
to produce text embeddings for nearly 700,000 items. Eventually, I am using the text embeddings to compute semantic similarity norms withtextSimiliaryNorm
. I don't store the text embedding, as this would require a lot of storage space, so it's just an interim step to calculating my text similarity norms.I get my text embedding like this:
where
comments
is a vector of a certain batch size.Running this in batch sizes of 1,000 items (
comments
), takes about 30 minutes on my laptop (8-Core Macbook Pro, 32MB RAM). To try and speed up this process, I have tried running the same procedure on an Amazon Web Services instance with a GPU. However, there doesn't appear to be a performance gain, despite the fact that I can confirm the GPU is being used when I runtextEmbed
:(I also don't get the warning from
text
saying that CUDA is not being used, whereas I do on my laptop).This 1077MB seems to be an upper bound on GPU usage, whether I change the batch size or get a bigger server with more GPU or CPU power.
The CPU usage is maxing out (100%), effectively, with whatever batch size I use. I have even tried a
g3.8xlarge
instance instance with 244 GB CPU memory. Again, the CPU is getting maxed out at 100% and the GPU is stuck on 1,077 MB usage, whentextEmbed
is being run. (Hence), I can't improve the processing times I get on my laptop, even though I am throwing way more power at the same processes.Do you have any idea why I am not experiencing any performance improvement? Please let me know if I can provide more information.
All my code is working fine (I get the text similarity norms I want at the end), I just need performance improvements. FYI: I am running my code interactively in the
R
terminal of the server (or RStudio on my laptop).All the best, Seb