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

Ubuntu22.4部署大模型前置安装

真机环境安装

安装Pytorch等依赖

将一下内容放入到requirements.txt

torch==2.4.1
torchaudio==2.4.1
packaging
jinja2
openai-whisper
jsonlines
pandas
validators
sty
transformers
librosa
accelerate
aiohttp
colorama
omegaconf==2.3.0
sox
six==1.16.0
hyperpyyaml
conformer==0.3.2
diffusers
pillow
sentencepiece
easydict
fire
ujson
cairosvg
immutabledict
rich
wget
gdown
datasets
torchdyn==1.0.6
huggingface_hub
loguru
decord
blobfile
timm
sacrebleu==1.5.1
soundfile
tqdm

然后 

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

安装cuda12.1 

Ubuntu22.4部署及更新cuda11.8与cuda12.1-CSDN博客

安装flash_attn

 下载flash_attn依赖(这一步很重要,要不然代码程序无法执行)

pip install flash_attn

如果一直无法安装,可直接下载安装文件,然后再安装

cd /opt/workspace/
wget https://github.moeyy.xyz/https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

以上下载地址可参考(Linux):Releases · Dao-AILab/flash-attention · GitHub 

windows系统参考:Releases · kingbri1/flash-attention · GitHub 

http://www.lryc.cn/news/608750.html

相关文章:

  • AI + 云原生:正在引爆下一代应用的技术革命
  • LabVIEW小波变换检测信号断点
  • HCIP笔记(第四章)
  • 悬挂的绳子,它的函数方程是什么样子的?
  • Python Dash 全面讲解
  • 大屏项目展示
  • 基于Springboot+UniApp+Ai实现模拟面试小工具八:管理端基础功能实现
  • RAG与智能体技术全景解析:架构革新、场景落地与未来趋势
  • linux2.6 和 unix-v6 源码实验
  • uni-app学习笔记01-项目初始化及相关文件
  • Java小红书源码1:1还原uniapp_仿小红书源码
  • UniApp 实现顶部固定导航栏 Tab 及滚动变色效果
  • 7.13.B+树
  • io_setup系统调用及示例
  • [AI8051U入门第十五步]W5500实现DHCP自动获取IP
  • UE5的渲染Debug技巧
  • [每周一更]-(第154期):Docker 底层深度剖析:掌控 CPU 与内存资源的艺术
  • Leetcode 12 java
  • GitHub 趋势日报 (2025年08月02日)
  • ThinkPad P16 Gen2,P16 Gen2 LTE(21FA,21FB)原装Win10Pro,Win11专业版系统镜像,恢复出厂开箱状态
  • All the Mods 9 - To the Sky - atm9sky 局域网联机报错可能解决方法
  • Timer串口常用库函数(STC8系列)
  • 代码随想录算法训练营第三十九天
  • 【内容规范】关于标题中【】标记的使用说明
  • 【机器学习③】 | CNN篇
  • k8s日志收集
  • Node.js 操作 MySQL
  • [硬件电路-129]:模拟电路 - 继电器的工作原理、关键指标、常用芯片与管脚定义
  • OSPF知识点整理
  • Flutter 函数的基本使用