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
Tom Aarsen commited on
Commit ·
85345af
1
Parent(s): 4de778d
Simplify processor_config.json for transformers v4.x compatibility
Browse files- processor_config.json +0 -51
- tokenizer_config.json +0 -1
processor_config.json
CHANGED
|
@@ -1,55 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"image_processor": {
|
| 3 |
-
"aspect_ratio_setting": "anyres",
|
| 4 |
-
"crop_size": {
|
| 5 |
-
"height": 336,
|
| 6 |
-
"width": 336
|
| 7 |
-
},
|
| 8 |
-
"do_center_crop": true,
|
| 9 |
-
"do_convert_rgb": true,
|
| 10 |
-
"do_normalize": true,
|
| 11 |
-
"do_pad": true,
|
| 12 |
-
"do_rescale": true,
|
| 13 |
-
"do_resize": true,
|
| 14 |
-
"image_grid_pinpoints": [
|
| 15 |
-
[
|
| 16 |
-
336,
|
| 17 |
-
672
|
| 18 |
-
],
|
| 19 |
-
[
|
| 20 |
-
672,
|
| 21 |
-
336
|
| 22 |
-
],
|
| 23 |
-
[
|
| 24 |
-
672,
|
| 25 |
-
672
|
| 26 |
-
],
|
| 27 |
-
[
|
| 28 |
-
1008,
|
| 29 |
-
336
|
| 30 |
-
],
|
| 31 |
-
[
|
| 32 |
-
336,
|
| 33 |
-
1008
|
| 34 |
-
]
|
| 35 |
-
],
|
| 36 |
-
"image_mean": [
|
| 37 |
-
0.48145466,
|
| 38 |
-
0.4578275,
|
| 39 |
-
0.40821073
|
| 40 |
-
],
|
| 41 |
-
"image_processor_type": "LlavaNextImageProcessor",
|
| 42 |
-
"image_std": [
|
| 43 |
-
0.26862954,
|
| 44 |
-
0.26130258,
|
| 45 |
-
0.27577711
|
| 46 |
-
],
|
| 47 |
-
"resample": 3,
|
| 48 |
-
"rescale_factor": 0.00392156862745098,
|
| 49 |
-
"size": {
|
| 50 |
-
"shortest_edge": 336
|
| 51 |
-
}
|
| 52 |
-
},
|
| 53 |
"image_token": "<image>",
|
| 54 |
"num_additional_image_tokens": 1,
|
| 55 |
"patch_size": 14,
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"image_token": "<image>",
|
| 3 |
"num_additional_image_tokens": 1,
|
| 4 |
"patch_size": 14,
|
tokenizer_config.json
CHANGED
|
@@ -74,7 +74,6 @@
|
|
| 74 |
"<target_img>"
|
| 75 |
],
|
| 76 |
"bos_token": "<s>",
|
| 77 |
-
|
| 78 |
"clean_up_tokenization_spaces": false,
|
| 79 |
"eos_token": "</s>",
|
| 80 |
"legacy": true,
|
|
|
|
| 74 |
"<target_img>"
|
| 75 |
],
|
| 76 |
"bos_token": "<s>",
|
|
|
|
| 77 |
"clean_up_tokenization_spaces": false,
|
| 78 |
"eos_token": "</s>",
|
| 79 |
"legacy": true,
|