Skip to content

Update GLM-V.md for AMD#298

Open
haic0 wants to merge 1 commit intovllm-project:mainfrom
haic0:patch-30
Open

Update GLM-V.md for AMD#298
haic0 wants to merge 1 commit intovllm-project:mainfrom
haic0:patch-30

Conversation

@haic0
Copy link
Copy Markdown
Contributor

@haic0 haic0 commented Mar 23, 2026

No description provided.

Signed-off-by: haic0 <149741444+haic0@users.noreply.github.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 expands the GLM-V documentation to incorporate comprehensive support for AMD GPUs. It provides clear guidance on installing vLLM for ROCm environments and outlines the necessary steps and configurations for running GLM models on AMD's MI300x series hardware, enhancing the accessibility of these models to a broader range of hardware platforms.

Highlights

  • ROCm Installation Instructions: Added a new section detailing how to install vLLM with ROCm support, including specific uv pip install commands and important notes regarding Python, ROCm, and glibc version requirements.
  • AMD GPU Support for GLM Models: Introduced a dedicated section providing instructions for running GLM-4.5V / GLM-4.6V models with FP8 or BF16 on AMD MI300x/MI325x/MI355x GPUs, complete with ROCm-specific vllm serve commands and environment variables.

🧠 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.

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
Copy Markdown
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 updates the documentation to include instructions for running on AMD GPUs (ROCm). The changes are clear and add valuable information. I've made a few suggestions to improve the consistency and readability of the instructions.

Comment thread GLM/GLM-V.md
Comment on lines +9 to +20
### CUDA
```bash
uv venv
source .venv/bin/activate
uv pip install -U vllm --torch-backend auto # vllm>=0.12.0 is required
```
### ROCm
```bash
uv venv
source .venv/bin/activate
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To improve clarity and avoid repetition, the virtual environment setup commands, which are common for both CUDA and ROCm, should be mentioned only once before the platform-specific instructions. This makes the guide easier to follow.

Suggested change
### CUDA
```bash
uv venv
source .venv/bin/activate
uv pip install -U vllm --torch-backend auto # vllm>=0.12.0 is required
```
### ROCm
```bash
uv venv
source .venv/bin/activate
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/
```
First, create and activate a virtual environment:
```bash
uv venv
source .venv/bin/activate

Then, install vLLM for your specific hardware:

CUDA

uv pip install -U vllm --torch-backend auto # vllm>=0.12.0 is required

ROCm

uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/

Comment thread GLM/GLM-V.md
* vLLM conservatively use 90% of GPU memory, you can set `--gpu-memory-utilization=0.95` to maximize KVCache.
* Make sure to follow the command-line instructions to ensure the tool-calling functionality is properly enabled.

## Running GLM-4.5V / GLM-4.6V with FP8 or BF16 on 4xMI300x/MI325x/MI355x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a minor typo in the heading. There's an extra space between GLM-4.6V and with.

Suggested change
## Running GLM-4.5V / GLM-4.6V with FP8 or BF16 on 4xMI300x/MI325x/MI355x
## Running GLM-4.5V / GLM-4.6V with FP8 or BF16 on 4xMI300x/MI325x/MI355x

Comment thread GLM/GLM-V.md
--mm-encoder-tp-mode data
```

* Please run pip install "transformers>=5.0.0" to upgrade before serving.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with the installation instructions that use uv pip, it would be better to use uv pip here as well.

Suggested change
* Please run pip install "transformers>=5.0.0" to upgrade before serving.
* Please run uv pip install "transformers>=5.0.0" to upgrade before serving.

Comment thread GLM/GLM-V.md
* Please run pip install "transformers>=5.0.0" to upgrade before serving.
* You can set `--max-model-len` to preserve memory. `--max-model-len=65536` is usually good for most scenarios. Note that GLM-4.5V only supports a 64K context length, while GLM-4.6V supports a 128K context length.
* You can set `--max-num-batched-tokens` to balance throughput and latency, higher means higher throughput but higher latency. `--max-num-batched-tokens=32768` is usually good for prompt-heavy workloads. But you can reduce it to 16k and 8k to reduce activation memory usage and decrease latency.
* vLLM conservatively use 90% of GPU memory, you can set `--gpu-memory-utilization=0.95` to maximize KVCache.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This list of tips is missing an important point about ensuring tool-calling functionality is enabled, which is present in the CUDA section. For consistency and to provide complete guidance, it should be added here as well.

Suggested change
* vLLM conservatively use 90% of GPU memory, you can set `--gpu-memory-utilization=0.95` to maximize KVCache.
* vLLM conservatively use 90% of GPU memory, you can set `--gpu-memory-utilization=0.95` to maximize KVCache.
* Make sure to follow the command-line instructions to ensure the tool-calling functionality is properly enabled.

Comment thread GLM/GLM-V.md
```
> Note: The vLLM wheel for ROCm requires Python 3.12, ROCm 7.0, and glibc >= 2.35. If your environment does not meet these requirements, please use the Docker-based setup as described in the [documentation](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/#pre-built-images).

## Running GLM-4.5V / GLM-4.6V with FP8 or BF16 on 4xH100
Copy link
Copy Markdown

@tjtanaa tjtanaa Mar 25, 2026

Choose a reason for hiding this comment

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

remove on 4xH100

and add 4xH100 to the ### CUDA

Comment thread GLM/GLM-V.md

Run tensor-parallel like this:

### CUDA
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

### CUDA (4xH100)

Comment thread GLM/GLM-V.md
* vLLM conservatively use 90% of GPU memory, you can set `--gpu-memory-utilization=0.95` to maximize KVCache.
* Make sure to follow the command-line instructions to ensure the tool-calling functionality is properly enabled.

## Running GLM-4.5V / GLM-4.6V with FP8 or BF16 on 4xMI300x/MI325x/MI355x
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't need to repeat the header. Merge the content with the existing section.

Comment thread GLM/GLM-V.md
--mm-encoder-tp-mode data \
--mm-processor-cache-type shm
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ROCm (4xMI300x/MI325x/MI355x)

# Start server with FP8 model on 4 GPUs, the model can also be changed to BF16 as zai-org/GLM-4.5V
SAFETENSORS_FAST_GPU=1 \
VLLM_ROCM_USE_AITER=1 \
vllm serve zai-org/GLM-4.5V-FP8 \
     --tensor-parallel-size 4 \
     --tool-call-parser glm45 \
     --reasoning-parser glm45 \
     --enable-auto-tool-choice \
     --enable-expert-parallel \
     --allowed-local-media-path / \
     --mm-encoder-tp-mode data 

NOTES:

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.

2 participants