Sentence Similarity
sentence-transformers
Safetensors
English
llava_next
multimodal-retrieval
embedding-model
custom_code
Instructions to use BAAI/BGE-VL-MLLM-S2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/BGE-VL-MLLM-S2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/BGE-VL-MLLM-S2", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Can task instruction be changed? And tokenizer bug? what's the difference between q and c embedding?
#3
by Labmem009 - opened
if I use
inputs = self.model.data_process(
text=text,
images=img,
q_or_c="q",
task_instruction="Generate embedding for the given text and image."
)
only to get embedding, it will perform worse?
And what's the difference between q and c embedding?
tokenizer bug:
fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
Exception: data did not match any variant of untagged enum ModelWrapper at line 268141 column 3