This commit is contained in:
ngxson 2024-04-27 21:24:25 +02:00
parent 509c28f4a1
commit 2df79ff950

View file

@ -234,7 +234,7 @@ class GGUFReader:
def _build_tensors(self, start_offs: int, fields: list[ReaderField]) -> None:
tensors = []
tensor_names = [] # keep track of name to prevent duplicated tensors
tensor_names = set() # keep track of name to prevent duplicated tensors
for field in fields:
_name_len, name_data, _n_dims, dims, raw_dtype, offset_tensor = field.parts
# check if there's any tensor having same name already in the list