gguf : fix typos

This commit is contained in:
Cebtenzzre 2023-10-02 14:57:08 -04:00
parent 64607e409b
commit bd890ec29e

View file

@ -362,7 +362,7 @@ class TensorNameMap:
def __init__(self, arch: MODEL_ARCH, n_blocks: int): def __init__(self, arch: MODEL_ARCH, n_blocks: int):
self.mapping = {} self.mapping = {}
for tensor, keys in self.mappings_cfg.items(): for tensor, keys in self.mappings_cfg.items():
if tensor not in MODEL_TENSORS[ARCH]: if tensor not in MODEL_TENSORS[arch]:
continue continue
tensor_name = TENSOR_NAMES[tensor] tensor_name = TENSOR_NAMES[tensor]
self.mapping[tensor_name] = (tensor, tensor_name) self.mapping[tensor_name] = (tensor, tensor_name)
@ -370,7 +370,7 @@ class TensorNameMap:
self.mapping[key] = (tensor, tensor_name) self.mapping[key] = (tensor, tensor_name)
for bid in range(n_blocks): for bid in range(n_blocks):
for tensor, keys in self.block_mappings_cfg.items(): for tensor, keys in self.block_mappings_cfg.items():
if tensor not in MODEL_TENSORS[ARCH]: if tensor not in MODEL_TENSORS[arch]:
continue continue
tensor_name = TENSOR_NAMES[tensor].format(bid = bid) tensor_name = TENSOR_NAMES[tensor].format(bid = bid)
self.mapping[tensor_name] = (tensor, tensor_name) self.mapping[tensor_name] = (tensor, tensor_name)