[Bug] Float8CurrentScaling / Float8BlockScaling: fp8_quant_* QParams ignore use_power_2_scales / use_f32_scales passed to the constructor
Los mantenedores suelen responder en 2 días
@Varun-51 ya está trabajando en esto.
Desde el 1/10/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- machine-learning
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 3.6k
- Forks
- 862
- Merge medio
- 4 d 18 h
- PR fusionados (30 d)
- 64
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/TransformerEngine
-
[Bug] group_quantize_fp8_blockwise: mbarrier invalidated before other threads finish waiting on itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/TransformerEngine#3647 ·
Los mantenedores suelen responder en 2 días
-
[PyTorch] fp8_cs_quantize fake implementation returns a vector inverse scale instead of a scalarPosiblemente ocupada @sanjana658 la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/TransformerEngine#3636 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
[Bug] Backend selection picks FA3 for training with head_dim_qk=192 / v_head_dim=128, but FA3 backward cannot run itQuizá libre de nuevo @modelpath-dev la tomó hace 41 días y no hay ningún pull request abierto. Abiertoattention
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NVIDIA/TransformerEngine#3481 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
Increase MAX_TENSOR_NUMAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
NVIDIA/TransformerEngine#2189 · 7 comentarios · 5 reacciones ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
NVIDIA/TransformerEngine#3668 ·
Los mantenedores suelen responder en 2 días
Todos los issues de NVIDIA/TransformerEngine
Issues similares
-
Workflow.schedule stops when a cron deadline passes before sleepPosiblemente ocupada @HuaTNA la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)Posiblemente ocupada @rusackas la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
apache/kyuubi#7786 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
[20.0] hr_work_entry: Duration column of Export Time Entries is truncated to whole hoursPosiblemente ocupada @odooaktiv la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
fix formatting of the sample database page of the docsPosiblemente ocupada @Aaqibhafeezkhan la tomó hoy. Abiertodocumentation good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
chaoss/CollectOSS#544 · 1 comentario ·
Los mantenedores suelen responder en 1 día