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依赖(这一步很重要,要不然代码程序无法执行)

python 复制代码
pip install flash_attn

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

python 复制代码
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

相关推荐
得贤招聘官16 分钟前
AI 重塑招聘格局,传统招聘模式面临转型挑战
人工智能
九章云极AladdinEdu17 分钟前
量子机器学习框架设计:基于Cirq的变分量子算法实现
人工智能·量子机器学习·cirq框架·变分量子算法·量子卷积·混合神经网络·参数化量子电路
平和男人杨争争18 分钟前
SNN(TTFS)论文阅读——LC-TTFS
论文阅读·人工智能·神经网络·机器学习
我要学脑机25 分钟前
prompt[ai开发项目指示]
人工智能·prompt
天天进步201530 分钟前
Python全栈项目:结合Puppeteer和AI模型操作浏览器
开发语言·人工智能·python
星座52837 分钟前
AI+CMIP6数据分析与可视化、降尺度技术与气候变化的区域影响、极端气候分析
人工智能·ai·气候·水文·cmip6
mwq301231 小时前
MiniMind 模型架构创新技术详解
人工智能
骄傲的心别枯萎1 小时前
RV1126 NO.45:RV1126+OPENCV在视频中添加LOGO图像
人工智能·opencv·计算机视觉·音视频·rv1126
这儿有一堆花1 小时前
向工程神经网络对二进制加法的巧妙解决方案
人工智能·深度学习·神经网络
撬动未来的支点1 小时前
【AI】拆解神经网络“技术高墙”:一条基于“根本原理-补丁理论-AI部署”哲学的学习路径
人工智能·神经网络