Enable Llama 4 + TRTLLM MHA#12003
Conversation
Summary of ChangesHello @b8zhong, 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 integrates and activates the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request enables the trtllm_mha attention backend for Llama 4 models, which shows performance improvements according to the benchmarks. The change is simple and correct. My review includes one point of feedback to update an outdated assertion message related to this change to ensure consistency.
|
Is trtllm_mha+llama4 runnable on blackwell or hopper or both of them? |
|
Both (since there is fa3 on hopper that is probably faster so i did not change default) |
|
Can you change the default backend to trtllm_mha for Llama-4, and add a CI test for it? Or CI test can be added after B200 CI is reenabled |
|
@Fridge003 Done |
Motivation
I don't know why it was blocked originally from being used (TBD maybe it was either not in yet, or was untested). A lot better than triton (currently)
Modifications
Unblock it.
python3 -m sglang.bench_serving --backend sglang --num-prompts 64 --dataset-name random --random-input-len 1024 --random-output-len 1024 --random-range-ratio 1 --max-concurrency=8 --flush-cacheBefore:
After:
Accuracy Tests
Acc is good
After: