Instructions to use maidalun1020/bce-embedding-base_v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use maidalun1020/bce-embedding-base_v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("maidalun1020/bce-embedding-base_v1") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use maidalun1020/bce-embedding-base_v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="maidalun1020/bce-embedding-base_v1")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("maidalun1020/bce-embedding-base_v1") model = AutoModel.from_pretrained("maidalun1020/bce-embedding-base_v1", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
已经获取了权限,使用git 下载模型时候依然错误
Input:
git clone https://huggingface.co/maidalun1020/bce-embedding-base_v1
Error:
Cloning into 'bce-embedding-base_v1'...
remote: Access to model maidalun1020/bce-embedding-base_v1 is restricted and you are not in the authorized list. Visit https://huggingface.co/maidalun1020/bce-embedding-base_v1 to ask for access.
fatal: unable to access 'https://huggingface.co/maidalun1020/bce-embedding-base_v1/': The requested URL returned error: 403
https://huggingface.co/settings/tokens
maybe:
- you should get your access tokens (read or write) first.
huggingface-cli loginwith your access token.- git clone
Thanks, problem solved.
I have faced the same problem.
Even it shows "login successful", I still have authorization error.
The error is below:
remote: Authorization error.
fatal: unable to access 'https://huggingface.co/maidalun1020/bce-embedding-base_v1/': The requested URL returned error: 403
I have faced the same problem.
Even it shows "login successful", I still have authorization error.
The error is below:
remote: Authorization error.
fatal: unable to access 'https://huggingface.co/maidalun1020/bce-embedding-base_v1/': The requested URL returned error: 403
Finally I found that I create a token which is not 'write' type
After I created a new one, I can download the model :)