Fix "local variable 'model' referenced before assignment" (#10022)

This commit is contained in:
Shaojun Liu 2024-01-29 16:18:04 +08:00 committed by GitHub
parent cc3f122f6a
commit 824c8029d7

View file

@ -59,6 +59,7 @@ def load_gguf_mixtral(loader: GGUFFileLoader, dtype: torch.dtype = torch.float,
# define an operator function that passed to low-level gguf API
def process_mixtral(name, tensor):
nonlocal model
# prepare module's name in transformers
module_name = get_mixtral_module_name(name)
# prepare module's weight in transformers