[LLM] Add trust_remote_code for local renamed model in bigdl_llm_model.py (#9762)
This commit is contained in:
		
							parent
							
								
									be13b162fe
								
							
						
					
					
						commit
						986f65cea9
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -243,7 +243,7 @@ class BigDLLLMAdapter(BaseModelAdapter):
 | 
			
		|||
    def load_model(self, model_path: str, from_pretrained_kwargs: dict):
 | 
			
		||||
        revision = from_pretrained_kwargs.get("revision", "main")
 | 
			
		||||
        tokenizer = AutoTokenizer.from_pretrained(
 | 
			
		||||
            model_path, use_fast=False, revision=revision
 | 
			
		||||
            model_path, use_fast=False, revision=revision, trust_remote_code=True
 | 
			
		||||
        )
 | 
			
		||||
        print("Customized bigdl-llm loader")
 | 
			
		||||
        from bigdl.llm.transformers import AutoModelForCausalLM
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue