Sentence Similarity
sentence-transformers
Safetensors
Transformers
Chinese
English
qwen2
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run BAAI/bge-code-v1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/BAAI/bge-code-v1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/BAAI/bge-code-v1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-code-v1") model = AutoModel.from_pretrained("BAAI/bge-code-v1", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Upload folder using huggingface_hub
Verified signaturebd67852
-
Upload folder using huggingface_hub
Verified signature33a79d7 -
Update sentence_bert_config.json (#3)
Verified signature- Update sentence_bert_config.json (a433369a897b43242a26ff25381d3f61bb89926b) Co-authored-by: lingyu li <lly0571@users.noreply.huggingface.co>0e42f6a -
Upload folder using huggingface_hub
Verified signaturec67bf19 -
Upload folder using huggingface_hub
Verified signature4e4d65a -
Slightly update Sentence Transformers snippet (#2)
Verified signature- Use the trust_remote_code parameter immediately (4cfebc7f5b6f76487db2c8d48a35978d993ed5ab)d44b53c
-
Upload folder using huggingface_hub
Verified signature3fa24f3 -
Upload folder using huggingface_hub
Verified signature0c5962b -
Upload folder using huggingface_hub
Verified signature7b03a43 -
initial commit
Verified signature5b58b37