diff --git a/src/h3_blackwell_runtime/nvfp4_quant.py b/src/h3_blackwell_runtime/nvfp4_quant.py index bd23ed6..ab92d3b 100644 --- a/src/h3_blackwell_runtime/nvfp4_quant.py +++ b/src/h3_blackwell_runtime/nvfp4_quant.py @@ -51,10 +51,10 @@ def _env_int(name: str, default: int) -> int: def _vortex_scale_geometry(numel: int) -> tuple[int, int]: - threads = _env_int("H3_NVFP4_SCALE_THREADS", 256) + threads = _env_int("H3_NVFP4_SCALE_THREADS", 128) if threads not in {128, 256, 512}: raise ValueError(f"H3_NVFP4_SCALE_THREADS must be 128, 256, or 512, got {threads}") - default_blocks = min((numel + threads - 1) // threads, 4096) + default_blocks = min((numel + threads - 1) // threads, 256) blocks = _env_int("H3_NVFP4_SCALE_BLOCKS", default_blocks) if blocks <= 0: raise ValueError(f"H3_NVFP4_SCALE_BLOCKS must be positive, got {blocks}")