当前位置: 首页 > news >正文

【大语言模型_4】源码编译vllm框架cpu版

背景:

       通过官方提供的pip install vllm安装的vllm框架不支持cpu加载模型。因此需要本地编译。

系统环境
       操作系统:UOS1070e

       python版本:3.10

编译步骤

      一、安装gcc/g++/cmake

       1、下载源码:https://github.com/vllm-project/vllm

  安装环境准备

        1、gcc/g++ 安装版本要求12.0版本及以上

        2、 cmake版本要求3.26及以上

        因为本人使用系统为uos1070e,官方提供版本较低,所以均选择源码安装

        1、gcc/g++源码安装:【运维】UOS1070e操作系统源码编译gcc-CSDN博客

        2、cmake源码安装:【运维】源码编译安装cmake-CSDN博客    

      二、安装numctl-devel
yum install numactl-devel

# 备注 
根据官方提供需要安装apt-get install libnuma-dev
对于基于 Red Hat 的系统(如 CentOS 和 Fedora),NUMA 相关的开发库通常包含在 numactl-devel 软件包中,而不是 libnuma-devel。选择安装 numactl-devel即可

三、pip下载依赖项

pip install --upgrade pip
pip install "cmake>=3.26" wheel packaging ninja "setuptools-scm>=8" numpy
# 进入vllm源码根目录
pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu
 四、源码开始编译vllm
VLLM_TARGET_DEVICE=cpu python setup.py install

错误排查:

1、vllm源码编译安装完成后,运行模型提示operator torchvision::nms does not exist错误

解决方法:安装torchvisioncpu版本

下载路径:https://download.pytorch.org/whl/torchvision

参考链接:

1、本地vllm部署DeepSeek,但CPU:https://zhuanlan.zhihu.com/p/22968294287

2、报错,operator torchvision::nms does not exist:https://download.csdn.net/blog/column/7248164/143227045

3、vllm中文网站:安装 | vLLM 中文站


文章转载自:

http://RO7dNFWZ.sfrmg.cn
http://oa2Tpz0C.sfrmg.cn
http://5Eq2h4vV.sfrmg.cn
http://zcoG6qLc.sfrmg.cn
http://2SzzLEKu.sfrmg.cn
http://5XWvBLmP.sfrmg.cn
http://JLrHvTyv.sfrmg.cn
http://TpOVxaWq.sfrmg.cn
http://3KKEjdzm.sfrmg.cn
http://AWT7YRrt.sfrmg.cn
http://xag1rIhz.sfrmg.cn
http://W67OOJnl.sfrmg.cn
http://atTSpWT2.sfrmg.cn
http://C8yZ36fo.sfrmg.cn
http://WEvN6px9.sfrmg.cn
http://oqhDz0ye.sfrmg.cn
http://r5ZZtinW.sfrmg.cn
http://xZlLatVf.sfrmg.cn
http://FhCHbrOF.sfrmg.cn
http://Dj6jaya7.sfrmg.cn
http://yLtAteeF.sfrmg.cn
http://UiOmGbKQ.sfrmg.cn
http://9wM3R6sj.sfrmg.cn
http://c4H9HjAW.sfrmg.cn
http://8bPCIh7Y.sfrmg.cn
http://6UFnnhja.sfrmg.cn
http://U76N4EG4.sfrmg.cn
http://06rl03wa.sfrmg.cn
http://BY5GTXB1.sfrmg.cn
http://iH8GWBRa.sfrmg.cn
http://www.dtcms.com/a/28482.html

相关文章:

  • Spring Data JPA 排序实战:基于 Sort 参数的实现
  • nginx ngx_http_module(9) 指令详解
  • Oracle LiveLabs实验:Oracle AI Vector Search - Basics
  • 如何通过AI优化敏捷开发中的任务管理与分配?
  • 将 Type Code 替换为 State/Strategy 模式
  • 服务器通过 ollama 运行deepseek r1
  • 《养生》(二)
  • Docker+Dify部署DeepSeek-r1本地知识库
  • Adpative Cursor Sharing引发的Oracle故障案例
  • Z-score方法是什么
  • 一周学会Flask3 Python Web开发-redirect重定向
  • 如何在 ubuntu 上使用 Clash 与 docker 开启代理拉起
  • uniapp 使用unplugin-auto-import 后, vue文件报红问题
  • QT qbytearray转qString
  • 【系列专栏】银行信息系统研发风险管控-工作方法 07
  • Jenkins 环境搭建---基于 Docker
  • vscode 配置 Copilot 提示GHE.com连接失败
  • format() 方法的常见用法
  • 解耦的艺术_应用架构中的解耦
  • ima接入deepseek-r1
  • AI客服-接入deepseek大模型到微信(本地部署deepseek集成微信自动收发消息)
  • 常用的性能优化方法和技巧
  • 网站快速收录:利用新闻源的优势
  • centos下使用pyenv管理python版本
  • SOME/IP-SD -- 协议英文原文讲解1
  • 代码随想录day16
  • 【量化科普】Standard Deviation,标准差
  • 《Operating System Concepts》阅读笔记:p50-p61
  • 后端开发-分页游标设计(解决大数据量分页查询时的性能问题)
  • Bio-ORACLE数据分享[decade 2010-2020] [Surface layers]