-
Notifications
You must be signed in to change notification settings - Fork 52
[WIP][AQUA] GPU Shape Recommendation #1221
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
2f54f8b
to
26e08a2
Compare
}, | ||
"VM.GPU.A10.1": { | ||
"gpu_count": 1, | ||
"gpu_memory_in_gbs": 24, | ||
"gpu_type": "A10" | ||
"gpu_type": "A10", |
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.
Let's add FP8 for the A10 shapes as well.
ads/aqua/common/utils.py
Outdated
@@ -1287,6 +1287,7 @@ def load_gpu_shapes_index( | |||
|
|||
# Merge: remote shapes override local | |||
local_shapes = local_data.get("shapes", {}) | |||
remote_data = {} |
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.
Why do we need this?
@@ -13,6 +13,7 @@ | |||
from ads.aqua.extension.evaluation_handler import __handlers__ as __eval_handlers__ | |||
from ads.aqua.extension.finetune_handler import __handlers__ as __finetune_handlers__ | |||
from ads.aqua.extension.model_handler import __handlers__ as __model_handlers__ | |||
from ads.aqua.extension.recommend_handler import __handlers__ as __gpu_handlers__ |
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 we can name it as __shape_handler
?
Detects quantization bit-width as a string (e.g., '4bit', '8bit') from Hugging Face config dict. | ||
""" | ||
if raw.get("load_in_8bit"): | ||
return "8bit" |
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.
It would be better to move this into constants.
If model is un-quantized, uses the weight size. | ||
If model is pre-quantized, uses the quantization level. | ||
""" | ||
key = (self.quantization or self.weight_dtype or "float32").lower() |
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.
Let's move "float32" to constants
""" | ||
vals = [] | ||
curr = min_len | ||
max_seq_len = 16384 if not self.max_seq_len else self.max_seq_len |
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.
Let's move the numbers like 16384 to constants and add some description there
Wrote an additional POST API and aqua command for recommending GPU shapes for a particular model
Returns

Returns
Status: business logic works, API works, unit tests finished, rich diff CLI table finished
