Sentence Similarity
sentence-transformers
Safetensors
Transformers
Chinese
English
qwen2
feature-extraction
text-embeddings-inference
Instructions to use BAAI/bge-code-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-code-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-code-v1") sentences = [ "那是 個快樂的人", "那是 條快樂的狗", "那是 個非常幸福的人", "今天是晴天" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use BAAI/bge-code-v1 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-code-v1") model = AutoModel.from_pretrained("BAAI/bge-code-v1") - Notebooks
- Google Colab
- Kaggle
Unable to load the custom tokenizer
#1
by tomaarsen - opened
Hello!
I'm excited to give this a try, but I ran into issues loading the custom tokenizer using the transformers and sentence_transformers snippets from the README. It seems to be caused by this, which does not point to a HF repository (or this repository itself): https://huggingface.co/BAAI/bge-code-v1/blob/main/tokenizer_config.json#L205
- Tom Aarsen
Thank you!
tomaarsen changed discussion status to closed