We use MS Marco Encoder msmarco-MiniLM-L-6-v3 from the sentence-transformers library to encode the text from dataset
abokbot/wikipedia-first-paragraph.
The dataset contains the first paragraphs of the English "20220301.en" version of the
Wikipedia dataset.
The output is an embedding tensor of size [6458670, 384].
It was obtained by running the following code.
1from datasets import load_dataset
2from sentence_transformers import SentenceTransformer
3
4dataset = load_dataset("abokbot/wikipedia-first-paragraph")
5bi_encoder = SentenceTransformer('msmarco-MiniLM-L-6-v3')
6bi_encoder.max_seq_length = 256
7wikipedia_embedding = bi_encoder.encode(dataset["text"], convert_to_tensor=True, show_progress_bar=True)
8
This operation took 35min on a Google Colab notebook with GPU.