bm25 without internet

#3
by slivka83 - opened

How can I run bm25 without internet?
This repository doesn't even contain weights?

This comment has been hidden (marked as Off-Topic)

You can download these files when you have internet access and then use them offline.

Where can I download them? There are no weights in this repository.

You can download these files when you have internet access and then use them offline.

Where can I download them? There are no weights in this repository.

Wondering the same.

anyone lucky to get this offline?

Qdrant org

hey @hghuge

In order to have it offline, you'd need to download the files first (for example, you could launch your code once with an internet connection, then, if you're on the same machine, set local_files_only=True and use it without internet, or copy the downloaded folder to another machine and launch the code with local_files_only=True without internet connection)

I feel like those who answer questions want to intentionally confuse everybody here. BM25 is not an embedding model and doesn't have "weights" in a sense of ML models.

Qdrant org

It does not have weights, but it has files with stopwords, which have to be downloaded

Heres how to do it Install it locally

first do : pip install fastembed==0.7.3

Load the model to local:
"""
from fastembed import TextEmbedding, SparseTextEmbedding
sparse_model_path = "./sparsemodel"
sparse = SparseTextEmbedding(model_name="Qdrant/bm25", cache_dir=sparse_model_path)
"""

Call the model from the local path
"""
from fastembed import TextEmbedding, SparseTextEmbedding
bm25_embedding_model = SparseTextEmbedding(model_name="Qdrant/bm25", specific_model_path=sparse_model_path)
"""

Now available within Qdrant core itself as of 1.15.2. No need to use fastembed. https://qdrant.tech/documentation/concepts/inference/#server-side-inference-bm25

Sign up or log in to comment