Pin online NVFP4 4over6 quantization settings (#33621)
This commit is contained in:
@@ -839,7 +839,13 @@ class DefaultModelLoader(BaseModelLoader):
|
||||
if is_nvfp4_online:
|
||||
# Scope exact FP4 quantization math to load-time conversion only;
|
||||
# restore the original environment before serving starts.
|
||||
with temp_set_env(FLASHINFER_DISABLE_FP4_QUANT_FAST_MATH="1"):
|
||||
with temp_set_env(
|
||||
FLASHINFER_DISABLE_FP4_QUANT_FAST_MATH="1",
|
||||
FLASHINFER_NVFP4_4OVER6="1",
|
||||
FLASHINFER_NVFP4_4OVER6_E4M3_USE_256="0",
|
||||
FLASHINFER_NVFP4_4OVER6_ERR_MODE="MSE",
|
||||
FLASHINFER_NVFP4_4OVER6_ERR_USE_FAST_MATH="1",
|
||||
):
|
||||
model.load_weights(weights)
|
||||
if target_device.type == "cuda":
|
||||
torch.cuda.synchronize()
|
||||
|
||||
Reference in New Issue
Block a user