Instructions to use jpohhhh/biencoder_embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpohhhh/biencoder_embedding with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jpohhhh/biencoder_embedding")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("jpohhhh/biencoder_embedding") model = AutoModel.from_pretrained("jpohhhh/biencoder_embedding", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Disable quantization
With GPU, torch says: AssertionError: Embedding quantization is only supported with float_qparams_weight_only_qconfig.713ed0a -
Update handler.py
97be557 -
Try quantizing model
8.2 seconds before quantizef2c3585 -
Disable forcing CUDA
~550 ms for 100 embeddings on T4c62769e -
Try forcing CUDA
Torch says its using CPU when requests are made to A10/T? instancesdb73123 -
Fix model reference
e7eebac -
Import Dict
bee946d -
Use SentenceTransformers instead
Per https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1/blob/main/README.mdb9a2f5d -
Update model
Per https://www.sbert.net/examples/applications/semantic-search/README.html, Imitating https://colab.research.google.com/github/UKPLab/sentence-transformers/blob/master/examples/applications/retrieve_rerank/retrieve_rerank_simple_wikipedia.ipynb#scrollTo=D_hDi8KzNgMMfce2850 -
Fork jpohhhh/embeddings_from_msmarco-MiniLM-L-6-v3
8b5c988 -
initial commit
3eb6e86