Skip to content

Commit 6bb97c0

Browse files
fix "div by 0" error
Signed-off-by: chichun-charlie-liu <[email protected]>
1 parent 515884e commit 6bb97c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fms_mo/dq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def run_dq(model_args, data_args, opt_args, fms_mo_args):
125125
logger.info(f"Tokenizer is {tokenizer}, block size is {block_size}")
126126
qcfg = qconfig_init(recipe="dq", args=fms_mo_args)
127127
# for models that cannot fit in 1 GPU, keep it in CPU and use block-wise calibration.
128-
total_gpu_memory = 0.0
128+
total_gpu_memory = 1e-5
129129
if torch.cuda.is_available():
130130
total_gpu_memory = torch.cuda.get_device_properties(0).total_memory / 1e9
131131
model_size = model_size_Wb(model, unit="GB")

0 commit comments

Comments
 (0)