Hi,
Using sentence-transformers/distilbert-base-nli-stsb-mean-tokens to embed sentences from corpus of 100K academic articles. Model is defined as below:
`self.model = ‘sentence-transformers/distilbert-base-nli-stsb-mean-tokens’
self.word_embedding_model = models.BERT(
self.model,
max_seq_length=128,
do_lower_case=True)
                self.pooling_model = models.Pooling(self.word_embedding_model.get_word_embedding_dimension(),
                                                    pooling_mode_mean_tokens=True,
                                                    pooling_mode_cls_token=False,
                                                    pooling_mode_max_tokens=False)

                self.model = SentenceTransformer(modules=[self.word_embedding_model, self.pooling_model])

self.corpus_embeddings = self.model.encode(self.corpus)
Running with 64GB ram with 3090FE (24GB vram), the encoding task makes it ~50% through before running out of memory.
Most grateful for any guidance on how I might be able to handle encoding of entire corpus - chunking it up, reduce model size (and best approach to that).
Many thanks