bio_embeddings icon indicating copy to clipboard operation
bio_embeddings copied to clipboard

CUDA out of memory.

Open wenyuhaokikika opened this issue 2 years ago • 2 comments

I had this problem when running the embed of bio_embedding,

ERROR:bio_embeddings.embed.embedder_interfaces:Error processing batch of 3 sequences: CUDA out of memory. Tried to allocate 972.00 MiB (GPU 1; 7.80 GiB total capacity; 4.91 GiB already allocated; 717.31 MiB free; 4.92 GiB reserved in total by PyTorch). You might want to consider adjusting the `batch_size` parameter. Will try to embed each sequence in the set individually on the GPU.

image

Although the final result is calculated, I am not sure if it calculated it correctly. Is there any option that can be set to avoid this, e.g. reduce batch_size size, use multiple GPU operations. I did not find the relevant options in ````examples/parameters_blueprint.yml```

wenyuhaokikika avatar Nov 04 '22 07:11 wenyuhaokikika

I seem to have the same problem...

zff1116 avatar Nov 04 '22 08:11 zff1116

EmbedderInterface.embed_many has a batch_size argument, but it doesn't use batching by default and processes each sentence individually.

fedorn avatar Nov 11 '22 15:11 fedorn