Skip to content

Commit 70db810

Browse files
maxdebayserckadner
andauthored
Add e5-multilingual to known configurations (#533)
# Description Adds e5-multilingual to known configurations. PELE tests are passing and have been added with another PR. --------- Signed-off-by: Max de Bayser <[email protected]> Signed-off-by: Christian Kadner <[email protected]> Co-authored-by: Christian Kadner <[email protected]>
1 parent 9360445 commit 70db810

File tree

7 files changed

+51
-3
lines changed

7 files changed

+51
-3
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ jobs:
119119
uv.lock
120120
tests/**/*.py
121121
vllm_spyre/**/*.py
122+
vllm_spyre/config/known_model_configs.json
123+
vllm_spyre/config/supported_configs.yaml
122124
123125
- name: "Install PyTorch 2.7.1"
124126
if: steps.changed-src-files.outputs.any_changed == 'true'
@@ -157,6 +159,7 @@ jobs:
157159
158160
- name: "Standardize HF model names for caching"
159161
id: standardize-names
162+
if: steps.changed-src-files.outputs.any_changed == 'true'
160163
run: |
161164
# replace '/' characters in HF_MODEL with '--' for GHA cache keys and
162165
# in model file names in local HF hub cache

docs/user_guide/supported_models.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ configurations.
3535
| [BAAI/BGE-Reranker (v2-m3)][] | 1 | 8192 | 1 |
3636
| [BAAI/BGE-Reranker (Large)][] | 1 | 512 | 1 |
3737
| [BAAI/BGE-Reranker (Large)][] | 1 | 512 | 64 |
38+
| [Multilingual-E5-large][] | 1 | 512 | 64 |
3839

3940
[Granite-3.3-8b]: https://huggingface.co/ibm-granite/granite-3.3-8b-instruct
4041
[Granite-3.3-8b (FP8)]: https://huggingface.co/ibm-granite/granite-3.3-8b-instruct
4142
[Granite-Embedding-125m (English)]: https://huggingface.co/ibm-granite/granite-embedding-125m-english
4243
[Granite-Embedding-278m (Multilingual)]: https://huggingface.co/ibm-granite/granite-embedding-278m-multilingual
4344
[BAAI/BGE-Reranker (v2-m3)]: https://huggingface.co/BAAI/bge-reranker-v2-m3
4445
[BAAI/BGE-Reranker (Large)]: https://huggingface.co/BAAI/bge-reranker-large
46+
[Multilingual-E5-large]: https://huggingface.co/intfloat/multilingual-e5-large
4547

4648
## Runtime Validation
4749

tests/download_model_configs.py

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python3
2+
13
import os
24
from pathlib import Path
35
from urllib.request import urlretrieve
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"architectures": [
3+
"XLMRobertaModel"
4+
],
5+
"attention_probs_dropout_prob": 0.1,
6+
"bos_token_id": 0,
7+
"classifier_dropout": null,
8+
"eos_token_id": 2,
9+
"hidden_act": "gelu",
10+
"hidden_dropout_prob": 0.1,
11+
"hidden_size": 1024,
12+
"initializer_range": 0.02,
13+
"intermediate_size": 4096,
14+
"layer_norm_eps": 1e-05,
15+
"max_position_embeddings": 514,
16+
"model_type": "xlm-roberta",
17+
"num_attention_heads": 16,
18+
"num_hidden_layers": 24,
19+
"output_past": true,
20+
"pad_token_id": 1,
21+
"position_embedding_type": "absolute",
22+
"torch_dtype": "float32",
23+
"transformers_version": "4.55.2",
24+
"type_vocab_size": 1,
25+
"use_cache": true,
26+
"vocab_size": 250002
27+
}

tests/utils/test_model_config_validator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,12 @@ def test_find_model_by_config(monkeypatch, caplog):
212212
assert model_config.model != model_id
213213

214214
models_found = find_known_models_by_model_config(model_config)
215-
assert len(models_found) == 1
215+
assert len(models_found) == 1, \
216+
(f"More than one model found. Need to add more distinguishing"
217+
f" parameters for models `{models_found}` in file"
218+
f" `vllm_spyre/config/known_model_configs.json`")
216219
assert models_found[0] == model_id
217220

218221
validate(model_config)
219-
assert f"Model '{model_config.model}' is not a known model"
222+
assert f"Model '{model_config.model}' is not a known" in caplog.text
220223
assert f"Found model '{model_id}'" in caplog.text

vllm_spyre/config/known_model_configs.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"BAAI/bge-reranker-large": {
3+
"architectures": ["XLMRobertaForSequenceClassification"],
34
"model_type": "xlm-roberta",
45
"max_position_embeddings": 514,
56
"num_hidden_layers": 24,
@@ -39,5 +40,11 @@
3940
"model_type": "roberta",
4041
"num_hidden_layers": 24,
4142
"vocab_size": 50265
43+
},
44+
"intfloat/multilingual-e5-large": {
45+
"architectures": ["XLMRobertaModel"],
46+
"model_type": "xlm-roberta",
47+
"num_hidden_layers": 24,
48+
"vocab_size": 250002
4249
}
43-
}
50+
}

vllm_spyre/config/supported_configs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
configs: [
3232
{ cb: False, tp_size: 1, warmup_shapes: [[512, 0, 64]] },
3333
]
34+
- model: "intfloat/multilingual-e5-large"
35+
configs: [
36+
{ cb: False, tp_size: 1, warmup_shapes: [[512, 0, 64]] },
37+
]
3438
- model: "BAAI/bge-reranker-v2-m3"
3539
configs: [
3640
{ cb: False, tp_size: 1, warmup_shapes: [[8192, 0, 1]] },

0 commit comments

Comments
 (0)