We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is how I use sentence-transformers on Windows 10 home
pkl = 'path/to/some.pkl' query = 'some query' from sentence_transformers import SentenceTransformer, util model = SentenceTransformer('path/to/sentence-transformers_msmarco-distilbert-multilingual-en-de-v2-tmp-trained-scratch', device='cuda') with open(pkl, "rb") as fIn: stored_data = pickle.load(fIn) doc_emb = stored_data['doc_emb'] docs = stored_data['docs'] query_emb = model.encode(query.replace("\"",""), batch_size=6) scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist() del query_emb //use results
The pkl is 1 GB in size, and when running the script, nothing else can run due to the amount of RAM and swapfile occupation.
The first run is also time consuming, then each query comes quickly.
How can I make it require significantly less memory and start up faster?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is how I use sentence-transformers on Windows 10 home
The pkl is 1 GB in size, and when running the script, nothing else can run due to the amount of RAM and swapfile occupation.
The first run is also time consuming, then each query comes quickly.
How can I make it require significantly less memory and start up faster?
The text was updated successfully, but these errors were encountered: