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

 算力环境配置参考:

Linux环境下部署百度百川AI大模型-基于厚德云-CSDN博客

  服务器环境

显存:24 GB
CPU:16 核   
内存:100 GB
总存储: 160 GB

软件环境

git
python 3.10.13
pytorch 2.4.0

 算力平台

厚德云

步骤一:下载Qwen模型

mkdir /workspace/
cd /workspace/
git  clone https://github.moeyy.xyz/https://github.com/QwenLM/Qwen

步骤二:下载依赖

cd Qwen
pip install -r requirements.txt
pip install -r requirements_web_demo.txt
pip install bitsandbytes==0.41.1
pip install accelerate==0.25.0
pip install streamlit
sudo apt update
sudo apt install git-lfs

步骤三:下载模型库

mkdir Qwen
cd Qwen
git lfs clone https://www.modelscope.cn/ccyh123/Qwen-7B-Chat.git

步骤四:启动并应用大模型

cd /workspace/Qwen/
python cli_demo.py

步骤五:网页版启动

cd /workspace/Qwen/
streamlit run web_demo.py

步骤六:使用Qwen大模型

 

Streamliticon-default.png?t=N7T8http://211.93.18.69:64123/

Streamliticon-default.png?t=N7T8http://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

  • 16
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数智侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值