Feature Extraction
sentence-transformers
Safetensors
Transformers
mistral
sentence-similarity
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use BAAI/bge-en-icl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-en-icl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-en-icl") 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 BAAI/bge-en-icl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BAAI/bge-en-icl")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-en-icl") model = AutoModel.from_pretrained("BAAI/bge-en-icl", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download special_tokens_map.json from BAAI/bge-en-icl: direct link, hf CLI and curl.
- Browser
- Download file 640 Bytes
-
https://huggingface.co/BAAI/bge-en-icl/resolve/main/special_tokens_map.json
- Command line
-
hf download hf://BAAI/bge-en-icl/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/BAAI/bge-en-icl/resolve/main/special_tokens_map.json
640 Bytes
| { | |
| "additional_special_tokens": [ | |
| "<instruct>", | |
| "<query>", | |
| "<response>" | |
| ], | |
| "bos_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "unk_token": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |