Skip to content

[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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elizjo
Copy link
Member

@elizjo elizjo commented Jul 7, 2025

Wrote an additional POST API and aqua command for recommending GPU shapes for a particular model

POST /gpu-shape-recommendation{    "model": "meta-llama/Llama-4-Scout-17B-16E",    "max_model_len": 4096}

ads aqua recommend which_gpu --model  "meta-llama/Llama-4-Scout-17B-16E" --max_model_len 4096

Returns

{
    "recommendations": [
        {
            "batch_size": 1,
            "max_seq_len": 65536,
            "precision": "bfloat16",
            "gb_used_by_model": 14.729,
            "shape_reports": [
                {
                    "shape": "VM.GPU2.1",
                    "gpu_reports": [
                        {
                            "gpu_count": 1,
                            "gpu_memory_in_gb": 16,
                            "limiting_factor": "The selected model configuration is close to GPU Memory Limit (14.7GB used / 15.2GB allowed).\\nBoth model weights and KV cache are significant contributors to memory use. (7.5GB KV cache, 7.2GB weights).\\n.\\n\\nTo reduce model size:\\n1. Consider using a model with fewer parameters. \\n2. Use the same model with float16, int8 quantization, which is smaller than the current quantization/ weight size: bfloat16."
                        }
                    ]
                },
    ]
}

TODO:
logic for extracting the config.json from the huggingface model needs to be improved
need to write a whole unit test module + conduct testing (business logic works, but API is untested)

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 7, 2025
Copy link

github-actions bot commented Jul 7, 2025

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-18.62%

@mrDzurb mrDzurb changed the title GPU Shape Recommendation [AQUA] GPU Shape Recommendation Jul 7, 2025
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.

1 participant