Skip to content

Commit 0a06e02

Browse files
committed
Adds VLLM Llama4 into compatible container families.
1 parent 350a59d commit 0a06e02

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

ads/aqua/common/enums.py

+6
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class InferenceContainerType(ExtendedEnum):
4949
class InferenceContainerTypeFamily(ExtendedEnum):
5050
AQUA_VLLM_CONTAINER_FAMILY = "odsc-vllm-serving"
5151
AQUA_VLLM_V1_CONTAINER_FAMILY = "odsc-vllm-serving-v1"
52+
AQUA_VLLM_LLAMA4_CONTAINER_FAMILY = "odsc-vllm-serving-llama4"
5253
AQUA_TGI_CONTAINER_FAMILY = "odsc-tgi-serving"
5354
AQUA_LLAMA_CPP_CONTAINER_FAMILY = "odsc-llama-cpp-serving"
5455

@@ -119,4 +120,9 @@ class Platform(ExtendedEnum):
119120
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY,
120121
InferenceContainerTypeFamily.AQUA_VLLM_CONTAINER_FAMILY,
121122
],
123+
InferenceContainerTypeFamily.AQUA_VLLM_LLAMA4_CONTAINER_FAMILY: [
124+
InferenceContainerTypeFamily.AQUA_VLLM_LLAMA4_CONTAINER_FAMILY,
125+
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY,
126+
InferenceContainerTypeFamily.AQUA_VLLM_CONTAINER_FAMILY,
127+
],
122128
}

ads/aqua/model/model.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,17 @@ def create_multi(
316316
# )
317317

318318
# check if model is a fine-tuned model and if so, add the fine tuned weights path to the fine_tune_weights_location pydantic field
319-
is_fine_tuned_model = Tags.AQUA_FINE_TUNED_MODEL_TAG in source_model.freeform_tags
319+
is_fine_tuned_model = (
320+
Tags.AQUA_FINE_TUNED_MODEL_TAG in source_model.freeform_tags
321+
)
320322

321323
if is_fine_tuned_model:
322-
model.model_id, model.model_name = extract_base_model_from_ft(source_model)
323-
model_artifact_path, model.fine_tune_weights_location = extract_fine_tune_artifacts_path(source_model)
324+
model.model_id, model.model_name = extract_base_model_from_ft(
325+
source_model
326+
)
327+
model_artifact_path, model.fine_tune_weights_location = (
328+
extract_fine_tune_artifacts_path(source_model)
329+
)
324330

325331
else:
326332
# Retrieve model artifact for base models
@@ -380,7 +386,8 @@ def create_multi(
380386
raise AquaValueError(
381387
"The selected models are associated with different container families: "
382388
f"{list(selected_models_deployment_containers)}."
383-
"For multi-model deployment, all models in the group must share the same container family."
389+
"For multi-model deployment, all models in the group must belong to the same container "
390+
"family or to compatible container families."
384391
)
385392
else:
386393
deployment_container = selected_models_deployment_containers.pop()

tests/unitary/with_extras/aqua/test_common_utils.py

+18
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,26 @@ class TestCommonUtils:
1616
{"odsc-vllm-serving", "odsc-vllm-serving-v1"},
1717
"odsc-vllm-serving-v1",
1818
),
19+
(
20+
{"odsc-vllm-serving", "odsc-vllm-serving-llama4"},
21+
"odsc-vllm-serving-llama4",
22+
),
23+
(
24+
{"odsc-vllm-serving-v1", "odsc-vllm-serving-llama4"},
25+
"odsc-vllm-serving-llama4",
26+
),
27+
(
28+
{
29+
"odsc-vllm-serving",
30+
"odsc-vllm-serving-v1",
31+
"odsc-vllm-serving-llama4",
32+
},
33+
"odsc-vllm-serving-llama4",
34+
),
1935
({"odsc-tgi-serving", "odsc-vllm-serving"}, None),
2036
({"non-existing-one", "odsc-tgi-serving"}, None),
37+
({"odsc-tgi-serving", "odsc-vllm-serving-llama4"}, None),
38+
({"odsc-tgi-serving", "odsc-vllm-serving-v1"}, None),
2139
],
2240
)
2341
def test_get_preferred_compatible_family(self, input_families, expected):

0 commit comments

Comments
 (0)