From 4c0170e20642311dadddaf796185a0e60da5c363 Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Tue, 8 Apr 2025 11:47:58 -0400 Subject: [PATCH] convert : fix flake8 lint regarding lamdba assigment --- convert_hf_to_gguf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index b47a3d85ec..72d2f7a815 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -5416,8 +5416,7 @@ class LazyTorchTensor(gguf.LazyBase): dtype = cls._dtype_str_map[remote_tensor.dtype] shape = remote_tensor.shape meta = cls.meta_with_dtype_and_shape(dtype, shape) - func = lambda r: torch.frombuffer(r.data(), dtype=dtype).reshape(shape) - lazy = cls(meta=meta, args=(remote_tensor,), func=func) + lazy = cls(meta=meta, args=(remote_tensor,), func=lambda r: torch.frombuffer(r.data(), dtype=dtype).reshape(shape)) return cast(torch.Tensor, lazy) @classmethod