补充了"不能正常加载ChatGLM的参数"的解决方法
补充了"不能正常加载ChatGLM的参数"的解决方法
This commit is contained in:
		
							parent
							
								
									9f7cf7c4d8
								
							
						
					
					
						commit
						c17882af8a
					
				@ -112,6 +112,10 @@ python -m pip install -r requirements.txt
 | 
			
		||||
如果需要支持清华ChatGLM后端,需要额外安装更多依赖(前提条件:熟悉python + 电脑配置够强):
 | 
			
		||||
```sh
 | 
			
		||||
python -m pip install -r request_llm/requirements_chatglm.txt
 | 
			
		||||
 | 
			
		||||
# 备注:如果遇到"Call ChatGLM fail 不能正常加载ChatGLM的参数" 错误,参考如下:
 | 
			
		||||
# 1:以上默认安装的为torch+cpu版,使用cuda需要卸载torch重新安装torch+cuda
 | 
			
		||||
# 2:如因本机配置不够无法加载模型,可以修改request_llm/bridge_chatglm.py中的模型精度, 将 AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True) 都修改为 AutoTokenizer.from_pretrained("THUDM/chatglm-6b-int4", trust_remote_code=True)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
4. 运行
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user