[Feature] Fuse the post-attention residual RMSNorm with tensor-parallel reduction in dense Qwen3

オープン
#23,073 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@laikhtewari がすでに取り組んでいます。

2026年11月30日 から。

  • #23074 @HaoyangPing0324 による — オープン

評価

この issue はまだ評価されていません。

説明

feature request Pytorch
🚀 The feature, motivation and pitch

Motivation

In the PyTorch backend, each dense Qwen3 block reduces the attention output projection across tensor-parallel ranks and then calls post_attention_layernorm with the residual. The row projection already accepts AllReduceParams and the collective supports returning the normalized activation and updated residual together. Dense Qwen3 currently leaves this epilogue unused. This path runs once per decoder layer per forward pass. The previous Qwen3 fusion in #4304 changed the MoE implementation. Dense decoder

Proposed scope

Use the existing RESIDUAL_RMS_NORM epilogue for unquantized BF16 dense Qwen3 text generation with ordinary MPI tensor parallelism and the automatic all-reduce strategy. Keep the existing small-hidden-size accuracy guard used in Llama and the Qwen3 eager-fusion switch. Attention DP, context parallelism, sparse hooks and compilation can continue to use the current path.

For Qwen/Qwen3-14B on two H20s, streaming 128-token prompts with 24 generated tokens at concurrency four, median first-token latency measured 96.13 to 92.64 ms and 95.45 to 91.45 ms in two runs with reversed launch order. The measured benefit was smaller at high concurrency.

Alternatives

No response

Additional context

No response

Before submitting a new issue...
  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
主要言語
Python
スター
15.2k
フォーク
3k
平均マージ
2日 21時間
マージ済み PR(30日)
477

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/TensorRT-LLM のほかの issue

NVIDIA/TensorRT-LLM の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。