Linux情况下部署阿里通义千问开源AI大模型-基于厚德云 ...

打印 上一主题 下一主题

主题 848|帖子 848|积分 2544

 算力情况设置参考:
  Linux情况下部署百度百川AI大模型-基于厚德云-CSDN博客    服务器情况
   显存:24 GB
CPU:16 核   
内存:100 GB
总存储: 160 GB
  软件情况
   git
python 3.10.13
pytorch 2.4.0
   算力平台
   厚德云
  步调一:下载Qwen模型

  1. mkdir /workspace/
  2. cd /workspace/
  3. git  clone https://github.moeyy.xyz/https://github.com/QwenLM/Qwen
复制代码
步调二:下载依赖

  1. cd Qwen
  2. pip install -r requirements.txt
  3. pip install -r requirements_web_demo.txt
  4. pip install bitsandbytes==0.41.1
  5. pip install accelerate==0.25.0
  6. pip install streamlit
  7. sudo apt update
  8. sudo apt install git-lfs
复制代码
步调三:下载模型库

  1. mkdir Qwen
  2. cd Qwen
  3. git lfs clone https://www.modelscope.cn/ccyh123/Qwen-7B-Chat.git
复制代码
步调四:启动并应用大模型

  1. cd /workspace/Qwen/
  2. python cli_demo.py
复制代码


步调五:网页版启动

  1. cd /workspace/Qwen/
  2. streamlit run web_demo.py
复制代码





步调六:使用Qwen大模型


Streamlit
http://211.93.18.69:64123/

Streamlit
http://zhy1.dc.houdeyun.cn:64123/
FAQ

1、OutOfMemoryError: CUDA out of memory. Tried to allocate 64.00 MiB. GPU 0 has a total capacity of 23.65 GiB of which 15.81 MiB is free. Including non-PyTorch memory, this process has 23.63 GiB memory in use. Of the allocated memory 23.25 GiB is allocated by PyTorch, and 328.50 KiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
解决方案:
显存24G内存不足,升级GPU 
2、OSError: Cannot find empty port in range: 8000-8000. You can specify a different port by setting the GRADIO_SERVER_PORT environment variable or passing the `server_port` parameter to `launch()`.
IMPORTANT: You are using gradio version 3.41.2, however version 4.29.0 is available, please upgrade.
解决方案
修改/workspace/Qwen/web_demo.py文件的第31行,端标语改成别的,比如8010
3、 下载 https://github.com/QwenLM/Qwen 时间让输入用户名和密码
缘故原由:仓库不存在,请查看 https://github.com/QwenLM/Qwen仓库地址是否存在
解决方案:
如果不存在,可以查找别的仓库源码,以下为gitee上查找方式
Gitee Search

  1. git clone https://gitee.com/qzl66/Qwen
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

冬雨财经

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表