Skip to content

[AQUA][MMD] Enhance FT weights. #1206

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 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lu-ohai
Copy link
Member

@lu-ohai lu-ohai commented Jun 12, 2025

Enhance ft weights.

  • Updated the input format of models as below and added validation.
ads aqua deployment create \
  --container_image_uri "dsmc://odsc-vllm-serving:0.8.5.post1.6" \
  --models '[
    {
      "model_id": "ocid1.datasciencemodel.oc1.iad.<ocid>",
      "gpu_count": 1,
      "model_name": "meta-llama/Meta-Llama-3.1-8B",
      "model_task": "text_generation",
      "fine_tune_weights": [
        {
          "model_id": "ocid1.datasciencemodel.oc1.iad.<>",
          "model_name": "meta-llama/Meta-Llama-3.1-8B-FT1"
        },
        {
          "model_id": "ocid1.datasciencemodel.oc1.iad.<>",
          "model_name": "meta-llama/Meta-Llama-3.1-8B-FT2"
        }
      ]
    },
    {
      "model_task": "text_generation",
      "model_id": "ocid1.datasciencemodel.oc1.iad.<ocid>",
      "gpu_count": 1
    }
  ]' \
  --instance_shape "VM.GPU.A10.2" \
  --display_name "modelDeployment_multimodel"

Results

Screenshot 2025-06-12 at 3 15 12 PM

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 12, 2025
@lu-ohai lu-ohai requested a review from elizjo June 12, 2025 19:42
Copy link

📌 Cov diff with main:

Coverage-35%

📌 Overall coverage:

Coverage-58.24%

Copy link

📌 Cov diff with main:

Coverage-35%

📌 Overall coverage:

Coverage-58.24%

@mrDzurb mrDzurb changed the title Enhance ft weights. [AQUA][MMD] Enhance FT weights. Jun 16, 2025
model_name=model.model_name,
model_path=fine_tune_path,
if model.fine_tune_weights:
for loral_module_spec in model.fine_tune_weights:
Copy link
Member

Choose a reason for hiding this comment

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

NIT: lora_module_spec? (not sure if loral is intentional)

@@ -251,6 +251,8 @@ def create_multi(
----------
models : List[AquaMultiModelRef]
List of AquaMultiModelRef instances for creating a multi-model group.
model_details :
Copy link
Member

Choose a reason for hiding this comment

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

Is this for base models or just FT models- the description is not clear.

).value
if fine_tune_base_model_id != base_model_id:
error_message = f"Invalid fine tune model id {fine_tune_model_id} in `models.fine_tune_weights` input. Fine tune model must belong to base model {base_model_id}."
logger.error(error_message)
Copy link
Member

@elizjo elizjo Jun 16, 2025

Choose a reason for hiding this comment

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

NIT: may be easier for user if base model name was shown in error_message along with base_model_id:

The specified fine-tuned model '{fine_tune_model_name}' (OCID: {fine_tune_model_id}) does not belong to the required base model '{base_model_name}' (OCID: {base_model_id}).

error_message = f"Invalid fine tune model id {fine_tune_model_id} in `models.fine_tune_weights` input. Fine tune model must have tag {Tags.AQUA_FINE_TUNED_MODEL_TAG}."
logger.error(error_message)
raise ConfigValidationError(error_message)
fine_tune_base_model_id = fine_tune_model.custom_metadata_list.get(
Copy link
Member

Choose a reason for hiding this comment

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

maybe use extract_base_model_from_ft() here but this also ok

raise ConfigValidationError(error_message)
if base_model.lifecycle_state != "ACTIVE":
error_message = f"Invalid base model id {base_model_id}. Specify active base model id `model_id` in `models` input."
logger.error(error_message)
Copy link
Member

@elizjo elizjo Jun 16, 2025

Choose a reason for hiding this comment

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

base_model_id + base_model_name would be more descriptive in the error message. "Invalid model_id specified in models input: {base_model_name} with OCID {base_model_ocid} is not a base model.
Please provide the OCID of a base model, not a fine-tuned model, for model_id. "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants