huggingface_hub.errors.HFValidationError: Repo id must be in the form ‘repo_name’ or ‘namespace/repo_name’: ‘/opt/Yi/VL/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448’. Use repo_type argument if needed.
遇到上面的类似的问题,一定是路径问题:
一,解决办法
1,已下载的模型路径不对
这个报错实际上是本地找不到模型导致的,可以检查一下看看。
2,HuggingFace模型路径不对
model = AutoModel.from_pretrained(“./THUDM/chatglm-6b”, trust_remote_code=True).quantize(8).half().cuda()
比如这个这个,就用了相对地址应该用绝对地址
model = AutoModel.from_pretrained(“HuggingFace/THUDM/chatglm-6b”, trust_remote_code=True).quantize(8).half().cuda()
3、还有一种因素是模型下载不全,我的属于这种模型没有下载全的;

原因是:


4、配置好模型路径后,希望我的经验可以帮助到大家
HuggingFace模型路径错误解决
        
                  
                  
                  
                  
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					31万+
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            