当前位置: 首页 > 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.dtcms.com/a/312847.html

相关文章:

  • 零确认双花攻击
  • 智变时代:AI 如何重构工作边界与行业生态?
  • 【软考中级网络工程师】知识点之 IS-IS 协议
  • 百度招黑产溯源安全工程师
  • Spring AOP_2
  • CPA全国青少年编程能力等级测评试卷及答案 Python编程(一级)
  • 【代码详解】Triplane Meets Gaussian Splatting中triplane部分解析
  • 【代码随想录|454.四数相加、383.赎金信、15.三数之和、18.四数之和】
  • 模拟-6.N字形变换-力扣(LeetCode)
  • GPIO交换矩阵和IO_MUX
  • Python Seaborn【数据可视化库】 全面讲解
  • node.js常用函数
  • web前端React和Vue框架与库安全实践
  • Elastic 9.1/8.19:默认启用 BBQ,ES|QL 支持跨集群搜索(CCS)正式版,JOINS 正式版,集成 Azure AI Foundry
  • Python爬虫实战:研究awesome-python工具,构建技术资源采集系统
  • 【C语言】结构体详解
  • 第15届蓝桥杯Scratch图形化国赛初/中级组2024年9月7日真题
  • 使用DrissionPage实现xhs笔记自动翻页并爬取笔记视频、图片
  • 禁闭求生2 免安 中文 离线运行版
  • 初识prometheus
  • 控制建模matlab练习04:二阶系统的时域响应
  • Supergateway教程
  • 前端技术制作简单网页游戏
  • 力扣457:环形数组是否存在循环
  • 【Excel】利用函数和Power Query进行数据分析
  • Java企业级应用性能优化实战
  • 控制建模matlab练习09:超前补偿器
  • K8S部署ELK(四):部署logstash
  • 使用trae进行本地ai对话机器人的构建
  • 【LLM】 BaseModel的作用