diff --git a/gguf-py/gguf/tensor_mapping.py b/gguf-py/gguf/tensor_mapping.py index 8e1cac915..4457fc986 100644 --- a/gguf-py/gguf/tensor_mapping.py +++ b/gguf-py/gguf/tensor_mapping.py @@ -384,7 +384,7 @@ class TensorNameMap: mapping: dict[str, tuple[MODEL_TENSOR, str]] - def __init__(self, arch: MODEL_ARCH, n_blocks: int): + def __init__(self, arch: MODEL_ARCH, n_blocks: int, n_experts: int = 60): self.mapping = {} for tensor, keys in self.mappings_cfg.items(): if tensor not in MODEL_TENSORS[arch]: @@ -398,7 +398,6 @@ class TensorNameMap: if tensor not in MODEL_TENSORS[arch]: continue # TODO: make this configurable - n_experts = 60 for xid in range(n_experts): tensor_name = TENSOR_NAMES[tensor].format(bid = bid, xid = xid) self.mapping[tensor_name] = (tensor, tensor_name)