fix empty_cache error in pt_weights_iterator (#5151)

Co-authored-by: dangkai.dk <dangkai.dk@alibaba-inc.com>
This commit is contained in:
DangKai
2025-04-08 16:22:10 +08:00
committed by GitHub
parent 3033c11a21
commit cc88d98ab8

View File

@@ -457,7 +457,6 @@ def pt_weights_iterator(
state = torch.load(bin_file, map_location="cpu", weights_only=True)
yield from state.items()
del state
torch.cuda.empty_cache()
def get_gguf_extra_tensor_names(