[Bug] Float8CurrentScaling / Float8BlockScaling: fp8_quant_* QParams ignore use_power_2_scales / use_f32_scales passed to the constructor
メンテナーはふだん 2 日以内に返信
@Varun-51 がすでに取り組んでいます。
2026年10月1日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Read the Float8CurrentScaling and Float8BlockScaling definitions in transformer_engine/common/recipe/init.py, then compare their QParams construction with NVFP4BlockScaling.post_init. Reproduce on CPU using the provided constructor examples with environment defaults set to 0. Done when explicit constructor values are reflected in the corresponding fp8_quant_* QParams, while omitted arguments still use environment-variable defaults.
索引モデルが issue の本文から書いたものです。
説明
If use_power_2_scales (Float8CurrentScaling) or use_f32_scales (Float8BlockScaling) is passed to the constructor with a value different from its environment-variable default, the recipe reports the new value but its fp8_quant_* QParams retain the old value:
Float8CurrentScaling(use_power_2_scales=True)
use_power_2_scales = True
fp8_quant_fwd_inp.power_2_scale = False # expected True
Float8BlockScaling(use_f32_scales=True)
use_f32_scales = True
fp8_quant_fwd_inp.power_2_scale = True # expected False
Nothing raises an error, so the recipe configuration and the associated QParams can silently disagree.
Root cause (as far as I can tell)
In transformer_engine/common/recipe/init.py, fp8_quant_fwd_inp, fp8_quant_fwd_weight, and fp8_quant_bwd_grad are constructed in the class body using the class-level use_power_2_scales / use_f32_scales values.
They have no type annotation, so they are not dataclass fields. The QParams are therefore constructed once when the class is defined/imported. Passing an explicit value to the constructor changes the instance attribute, but does not rebuild the existing QParams.
NVFP4BlockScaling in the same file constructs its fp4_quant_* QParams in post_init, so those QParams are built per instance.
To Reproduce
NVTE_FP8_CURRENT_SCALING_POWER_2_SCALES=0
NVTE_FP8_BLOCK_SCALING_FP32_SCALES=0
python repro.py
from transformer_engine.common.recipe import (
Float8CurrentScaling,
Float8BlockScaling,
)
r = Float8CurrentScaling(use_power_2_scales=True)
print(r.use_power_2_scales, r.fp8_quant_fwd_inp.power_2_scale)
True False
r = Float8BlockScaling(use_f32_scales=True)
print(r.use_f32_scales, r.fp8_quant_fwd_inp.power_2_scale)
True True
This reproduces on CPU; no GPU or CUDA execution is required.
Expected behavior
The fp8_quant_* QParams should be constructed per instance from the effective recipe configuration, similar to NVFP4BlockScaling.
For example:
r = Float8CurrentScaling(use_power_2_scales=True)
assert r.use_power_2_scales is True
assert r.fp8_quant_fwd_inp.power_2_scale is True
r = Float8BlockScaling(use_f32_scales=True)
assert r.use_f32_scales is True
assert r.fp8_quant_fwd_inp.power_2_scale is False
The environment variables should still provide the default values when the corresponding constructor arguments are not passed.
Happy to work on this once assigned. Thanks
- 主要言語
- Python
- スター
- 3.6k
- フォーク
- 851
- 平均マージ
- 4日 20時間
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/TransformerEngine のほかの issue
-
[Bug] group_quantize_fp8_blockwise: mbarrier invalidated before other threads finish waiting on itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/TransformerEngine#3647 ·
メンテナーはふだん 2 日以内に返信
-
[PyTorch] fp8_cs_quantize fake implementation returns a vector inverse scale instead of a scalar対応中かも @sanjana658 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/TransformerEngine#3636 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] Backend selection picks FA3 for training with head_dim_qk=192 / v_head_dim=128, but FA3 backward cannot run it再び着手できるかも @modelpath-dev が 39 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンattention
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
NVIDIA/TransformerEngine#3481 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/TransformerEngine#2189 · コメント 7 件 · リアクション 5 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
NVIDIA/TransformerEngine#3668 ·
メンテナーはふだん 2 日以内に返信
NVIDIA/TransformerEngine の issue をすべて見る
似ている issue
-
effort: low prio: low ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
digitalfabrik/integreat-cms#4616 ·
メンテナーはふだん 5 日以内に返信
-
bug difficulty:2 good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
MakazhanAlpamys/Soup#1865 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FinanceFlash/unvibecode#233 ·
メンテナーはふだん 1 日以内に返信
-
area: agents area: docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exempt対応中かも @adityasinha-ghub が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pylint-dev/pylint#11656 ·
メンテナーはふだん 1 日以内に返信