Fix "local variable 'model' referenced before assignment" (#10022)
This commit is contained in:
		
							parent
							
								
									cc3f122f6a
								
							
						
					
					
						commit
						824c8029d7
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -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
 | 
					    # define an operator function that passed to low-level gguf API
 | 
				
			||||||
    def process_mixtral(name, tensor):
 | 
					    def process_mixtral(name, tensor):
 | 
				
			||||||
 | 
					        nonlocal model
 | 
				
			||||||
        # prepare module's name in transformers
 | 
					        # prepare module's name in transformers
 | 
				
			||||||
        module_name = get_mixtral_module_name(name)
 | 
					        module_name = get_mixtral_module_name(name)
 | 
				
			||||||
        # prepare module's weight in transformers
 | 
					        # prepare module's weight in transformers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue