[Performance]: Qwen NVFP4 output-head fallback allocates vocabulary-sized temporaries during CPU loading
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Proposal to improve performance
When a Qwen3.5-family checkpoint has a packed NVFP4 output head and the loader needs to expand it on CPU, the fallback creates a full FP32 weight matrix, integer lookup indices, and another full-size scaling result before casting. For the 248,320 × 2,048 head, the final BF16 output alone is 970 MiB. The temporary allocations add pressure during model loading.
To reproduce, pass a packed uint8 lm_head.weight, FP8 block scales, and an FP32 global scale to the Qwen HF mapper with native quantized-head execution disabled. Using deterministic synthetic values of the full checkpoint dimensions, baseline processing took 7.192 s and used a peak process RSS of 5,900,834 KiB (medians of four fresh processes). A bounded row-wise conversion can produce identical bytes with smaller temporary buffers.
Report of performance regression
No response
Misc discussion on performance
No response
Your current environment (if you think it is necessary)
H20 server, Intel Xeon Platinum 8469C, one pinned CPU core, Python 3.12.15, PyTorch 2.14.1+cu130, 8 GiB container, zero visible CUDA devices. Baseline 07f9fea. Inputs matched the physical shape and dtypes of nvidia/Qwen3.6-35B-A3B-NVFP4, revision 1355db6a052410cfd62085d94b58866fd0f2c3c5.
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
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/TensorRT-LLM のほかの issue
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.x対応中かも @NimaVaziri が今日担当しました。 オープンPytorch
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/TensorRT-LLM#23406 ·
メンテナーはふだん 1 日以内に返信
-
Inference runtime Windows
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA/TensorRT-LLM#23394 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: MMLU subsampling changes when evaluators are interleaved対応中かも @LeNeLeNeWo が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/TensorRT-LLM#23273 ·
メンテナーはふだん 1 日以内に返信
-
Trace-replay Pareto window includes the drain when sessions finish out of admission order対応中かも @sbeierle が 3 日前に担当しました。 オープンTesting
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NVIDIA/TensorRT-LLM#23077 ·
メンテナーはふだん 1 日以内に返信
-
LongBench V2 blog command breaks on inline comments after continuations対応中かも @ddlw が 25 日前に担当しました。 オープンDoc
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
NVIDIA/TensorRT-LLM#21879 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/TensorRT-LLM の issue をすべて見る
似ている issue
-
[Resource]: Spaicelyオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
hesreallyhim/awesome-claude-code#3875 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bvis/aegis-hass#725 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
#1643 unrecoverable split: 1 digest with a 403 — two earlier captures of the same URL are real 200sオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Robin-IA/Congressional-Letters-Dev#1684 ·
メンテナーはふだん 1 日以内に返信