Skip to content

Commit 4c0170e

Browse files
committed
convert : fix flake8 lint regarding lamdba assigment
1 parent 78094fc commit 4c0170e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5416,8 +5416,7 @@ def from_remote_tensor(cls, remote_tensor: gguf.utility.RemoteTensor):
54165416
dtype = cls._dtype_str_map[remote_tensor.dtype]
54175417
shape = remote_tensor.shape
54185418
meta = cls.meta_with_dtype_and_shape(dtype, shape)
5419-
func = lambda r: torch.frombuffer(r.data(), dtype=dtype).reshape(shape)
5420-
lazy = cls(meta=meta, args=(remote_tensor,), func=func)
5419+
lazy = cls(meta=meta, args=(remote_tensor,), func=lambda r: torch.frombuffer(r.data(), dtype=dtype).reshape(shape))
54215420
return cast(torch.Tensor, lazy)
54225421

54235422
@classmethod

0 commit comments

Comments
 (0)