Comments (3)
要在GPU上运行qwen15-32B-AWQ模型,您需要在server_config.py
文件中的FSCHAT_MODEL_WORKERS
字典里为您的模型配置设备设置。这里是一个配置示例,将模型设定为使用CUDA:
FSCHAT_MODEL_WORKERS = {
...
"qwen15-32B-AWQ": {
"device": "cuda",
},
...
}
确保您的系统已安装CUDA,并且GPU已正确配置以与CUDA一起工作。此外,如果您使用Docker,还需要安装NVIDIA Docker工具包,并在运行Docker容器时使用--gpus
标志。
完成这些配置后,通过检查配置文件中的LLM_DEVICE
设置来验证qwen15-32B-AWQ模型是否正在使用GPU。如果设置为"cuda"
,则表示模型已配置为使用GPU。如果是"auto"
,系统将自动检测并使用可用的GPU,尽管可能会发出有关自动检测的警告。如果模型或系统不支持GPU使用,或者没有可用的GPU,它可能会回退到使用CPU。
Details
Sources
- 设置成cpu时依然调用了显卡。
- 请问哪里可以设置GPU还是CPU运行?
- configs/server_config.py.example
- Dockerfile
- configs/model_config.py.example
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from langchain-chatchat.
model_config这里指定model用gpu来跑,不要auto,还是不行的话找一下安装的依赖fastchat里的model_adapter.py文件,修改一下1697这部分(我这里是1697行)
model = AutoModelForCausalLM.from_pretrained(
model_path,
#device_map="cuda:0", 加上这句,然后去掉注释试试。
config=config,
low_cpu_mem_usage=True,
trust_remote_code=True,
**from_pretrained_kwargs,
from langchain-chatchat.
问题已解决,感谢!
from langchain-chatchat.
Related Issues (20)
- 大模型问答用户输入问题 冒号后面的英文被自动去除格式也错乱了
- [FEATURE] agent对话时,使用工具如何让用户确认是否执行工具呢?
- [BUG] 使用qwen-api在线模型报错ERROR: RemoteProtocolError: Caught exception: peer closed connection without sending complete message body (incomplete chunked read)
- [BUG] 容器化项目,添加文件到知识库卡住,一直running,成功上传,但是没有添加到向量库 HOT 3
- langchain agents executor throws: assert generation is not None #22585 HOT 2
- 0.2.10版本无法与Qwen2正常对话 HOT 1
- 知识库用的xlsx文件,为什么反馈不了有价值的信息?
- 运行 startup.pu报错,大佬们能帮忙看一下吗?
- [BUG] 同一个模型使用Docker运行正常,使用K8S编排后启动报错 HOT 1
- 我们公司做成人视频的 旗下有麻豆传媒 我的telegram @HR606060 我们公司在金边 HOT 4
- 【问题】model_config.py 文件里面配置了 LLM_MODELS = ["Qwen-1_8B-Chat"],但是启动后,在WEB发送chat到本地,会走 openai 的代码 HOT 1
- 什么时候兼容glm4-9B? HOT 1
- glm-4-9b-chat输出结果停不下来的原因 HOT 1
- [BUG] 服务启动时的ERROR日志是什么原因
- 如何自定义agent工具,这个agent工具是如何被大模型调用的,以及如何传递值
- AttributeError: 'NoneType' object has no attribute 'conjugate' HOT 2
- chatchat 未找到相关文档,该回答为大模型自身能力解答!
- 知识库管理界面,对切片内容修改后只保存修改过的切片,其他切片不保存
- [BUG] Using the API to call the Embedding model of Aliyun Tongyi Qianwen, it is unable to perform knowledge base question answering. HOT 1
- 上传文件时一直卡在这里
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain-chatchat.