Skip to content

Adds VLLM LLaMA 4 support to the list of compatible container families for Multi-Model deployment. #1187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ads/aqua/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class InferenceContainerType(ExtendedEnum):
class InferenceContainerTypeFamily(ExtendedEnum):
AQUA_VLLM_CONTAINER_FAMILY = "odsc-vllm-serving"
AQUA_VLLM_V1_CONTAINER_FAMILY = "odsc-vllm-serving-v1"
AQUA_VLLM_LLAMA4_CONTAINER_FAMILY = "odsc-vllm-serving-llama4"
AQUA_TGI_CONTAINER_FAMILY = "odsc-tgi-serving"
AQUA_LLAMA_CPP_CONTAINER_FAMILY = "odsc-llama-cpp-serving"

Expand Down Expand Up @@ -119,4 +120,9 @@ class Platform(ExtendedEnum):
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY,
InferenceContainerTypeFamily.AQUA_VLLM_CONTAINER_FAMILY,
],
InferenceContainerTypeFamily.AQUA_VLLM_LLAMA4_CONTAINER_FAMILY: [
InferenceContainerTypeFamily.AQUA_VLLM_LLAMA4_CONTAINER_FAMILY,
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY,
InferenceContainerTypeFamily.AQUA_VLLM_CONTAINER_FAMILY,
],
}
15 changes: 11 additions & 4 deletions ads/aqua/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,17 @@ def create_multi(
# )

# 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
is_fine_tuned_model = Tags.AQUA_FINE_TUNED_MODEL_TAG in source_model.freeform_tags
is_fine_tuned_model = (
Tags.AQUA_FINE_TUNED_MODEL_TAG in source_model.freeform_tags
)

if is_fine_tuned_model:
model.model_id, model.model_name = extract_base_model_from_ft(source_model)
model_artifact_path, model.fine_tune_weights_location = extract_fine_tune_artifacts_path(source_model)
model.model_id, model.model_name = extract_base_model_from_ft(
source_model
)
model_artifact_path, model.fine_tune_weights_location = (
extract_fine_tune_artifacts_path(source_model)
)

else:
# Retrieve model artifact for base models
Expand Down Expand Up @@ -380,7 +386,8 @@ def create_multi(
raise AquaValueError(
"The selected models are associated with different container families: "
f"{list(selected_models_deployment_containers)}."
"For multi-model deployment, all models in the group must share the same container family."
"For multi-model deployment, all models in the group must belong to the same container "
"family or to compatible container families."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "two" instead of "to"

)
else:
deployment_container = selected_models_deployment_containers.pop()
Expand Down
18 changes: 18 additions & 0 deletions tests/unitary/with_extras/aqua/test_common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,26 @@ class TestCommonUtils:
{"odsc-vllm-serving", "odsc-vllm-serving-v1"},
"odsc-vllm-serving-v1",
),
(
{"odsc-vllm-serving", "odsc-vllm-serving-llama4"},
"odsc-vllm-serving-llama4",
),
(
{"odsc-vllm-serving-v1", "odsc-vllm-serving-llama4"},
"odsc-vllm-serving-llama4",
),
(
{
"odsc-vllm-serving",
"odsc-vllm-serving-v1",
"odsc-vllm-serving-llama4",
},
"odsc-vllm-serving-llama4",
),
({"odsc-tgi-serving", "odsc-vllm-serving"}, None),
({"non-existing-one", "odsc-tgi-serving"}, None),
({"odsc-tgi-serving", "odsc-vllm-serving-llama4"}, None),
({"odsc-tgi-serving", "odsc-vllm-serving-v1"}, None),
],
)
def test_get_preferred_compatible_family(self, input_families, expected):
Expand Down