Skip to content

Add AMD GPU support for Nemotron-3-Nano-30B-A3B#207

Open
GoldenGrapeGentleman wants to merge 1 commit intovllm-project:mainfrom
GoldenGrapeGentleman:add-nemotron-nano-amd-support
Open

Add AMD GPU support for Nemotron-3-Nano-30B-A3B#207
GoldenGrapeGentleman wants to merge 1 commit intovllm-project:mainfrom
GoldenGrapeGentleman:add-nemotron-nano-amd-support

Conversation

@GoldenGrapeGentleman
Copy link

  • Add AMD MI300X/MI325X/MI355X support section
  • Tested on ROCm 7.0.2 with rocm/vllm-dev:nightly
  • Requires VLLM_ROCM_USE_AITER=0 for compatibility
  • Document known limitations

Co-authored-by: billishyahao bill.he@amd.com
Co-authored-by: yueyuan yueyuan@amd.com

Tested and verified on AMD MI300X:
- Docker image: rocm/vllm-dev:nightly
- AITER disabled for compatibility
- Benchmark passed: 4/4 requests successful (1024/1024 input/output)

Co-authored-by: billishyahao <bill.he@amd.com>
Signed-off-by: Yuan Yue <yueyuan@amd.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @GoldenGrapeGentleman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the accessibility of the Nemotron-3-Nano-30B-A3B models by introducing detailed documentation for AMD MI300X GPU support. It provides users with a clear, step-by-step guide to set up their environment, configure the vLLM server, and run benchmarks, thereby broadening the hardware platforms capable of utilizing these models.

Highlights

  • AMD GPU Support Documentation: A new section has been added to the NVIDIA/Nemotron-3-Nano-30B-A3B.md file, providing comprehensive instructions for running Nemotron-3-Nano-30B-A3B models on AMD MI300X GPUs.
  • Detailed Setup Guide: The documentation includes step-by-step guidance for preparing the Docker environment using rocm/vllm-dev:nightly, logging into Hugging Face, starting the vLLM server with specific environment variables (SAFETENSORS_FAST_GPU=1, VLLM_USE_TRITON_FLASH_ATTN=0, VLLM_ROCM_USE_AITER=0), and executing benchmarks.
  • Compatibility Notes: The instructions highlight the requirement for VLLM_ROCM_USE_AITER=0 for compatibility, ensuring users can successfully deploy the model on AMD hardware.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds valuable documentation for running Nemotron-3-Nano-30B-A3B on AMD GPUs. The instructions are clear and easy to follow. I've added a few suggestions to improve the documentation's completeness and readability. Specifically, I've recommended listing all supported AMD GPUs, improving the formatting of a long command, clarifying support for the FP8 model variant, and adding the 'Known Limitations' section mentioned in the pull request description. These changes will help ensure users have all the necessary information to run the model successfully on AMD hardware.

--num-prompts 4 \
--ignore-eos \
--trust-remote-code
```
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The pull request description mentions 'Document known limitations', but this section is missing. It's important to include this for users. For example, the PR description states Requires VLLM_ROCM_USE_AITER=0 for compatibility, and while this is set in the server launch command, there is no explanation for why it's needed. Please add a 'Known Limitations' section to explain this and any other caveats for running on AMD hardware.


### AMD GPU Support

Please follow the steps here to install and run Nemotron-3-Nano-30B-A3B models on AMD MI300X GPU.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The PR description mentions support for MI300X/MI325X/MI355X, but the documentation only lists MI300X. To provide complete information to users, please list all supported AMD GPU models.

Suggested change
Please follow the steps here to install and run Nemotron-3-Nano-30B-A3B models on AMD MI300X GPU.
Please follow the steps here to install and run Nemotron-3-Nano-30B-A3B models on AMD MI300X/MI325X/MI355X GPUs.

```
Launch the ROCm vLLM docker:
```shell
docker run -it --ipc=host --network=host --privileged --cap-add=CAP_SYS_ADMIN --device=/dev/kfd --device=/dev/dri --device=/dev/mem --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $(pwd):/work -e SHELL=/bin/bash --name Nemotron-Nano rocm/vllm-dev:nightly
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This docker run command is very long and horizontally scrolls, which harms readability. Consider breaking it into multiple lines using backslashes (\) for better clarity and ease of use.

Suggested change
docker run -it --ipc=host --network=host --privileged --cap-add=CAP_SYS_ADMIN --device=/dev/kfd --device=/dev/dri --device=/dev/mem --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $(pwd):/work -e SHELL=/bin/bash --name Nemotron-Nano rocm/vllm-dev:nightly
docker run -it \
--ipc=host \
--network=host \
--privileged \
--cap-add=CAP_SYS_ADMIN \
--device=/dev/kfd \
--device=/dev/dri \
--device=/dev/mem \
--group-add video \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
-v $(pwd):/work \
-e SHELL=/bin/bash \
--name Nemotron-Nano \
rocm/vllm-dev:nightly

Comment on lines +302 to +310
SAFETENSORS_FAST_GPU=1 \
VLLM_USE_TRITON_FLASH_ATTN=0 \
VLLM_ROCM_USE_AITER=0 \
vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--max-num-seqs 256 \
--trust-remote-code \
--disable-log-requests
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The documentation for AMD GPU support only provides instructions for the BF16 model variant. The model also has an FP8 variant. Please clarify if FP8 is supported on AMD GPUs. If it is, please provide instructions for running it. If not, it would be helpful to state this explicitly as a known limitation. The NVIDIA section provides a good example of how to handle different data types using a DTYPE environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant