update pre-commit config (#18860)

This commit is contained in:
SoluMilken
2026-02-16 00:18:31 +08:00
committed by GitHub
parent f7603203b0
commit 07a24f1a38
135 changed files with 239 additions and 198 deletions
@@ -1,6 +1,7 @@
# Adapted from https://github.com/vllm-project/vllm/blob/v0.6.4.post1/vllm/model_executor/model_loader/weight_utils.py
"""Utilities for downloading and initializing model weights."""
import collections
import concurrent.futures
import fnmatch
@@ -140,12 +141,10 @@ def convert_bin_to_safetensor_file(
sf_size = os.stat(sf_filename).st_size
pt_size = os.stat(pt_filename).st_size
if (sf_size - pt_size) / pt_size > 0.01:
raise RuntimeError(
f"""The file size different is more than 1%:
raise RuntimeError(f"""The file size different is more than 1%:
- {sf_filename}: {sf_size}
- {pt_filename}: {pt_size}
"""
)
""")
# check if the tensors are the same
reloaded = safetensors.torch.load_file(sf_filename)