-
Notifications
You must be signed in to change notification settings - Fork 49
[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
base: main
Are you sure you want to change the base?
Conversation
model_name=model.model_name, | ||
model_path=fine_tune_path, | ||
if model.fine_tune_weights: | ||
for loral_module_spec in model.fine_tune_weights: |
There was a problem hiding this comment.
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 : |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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. "
Enhance ft weights.
models
as below and added validation.Results