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

相关推荐
Debroon11 分钟前
大模型幻觉的本质:深度=逻辑层次,宽度=组合限制,深度为n的神经网络最多只能处理n层逻辑推理,宽度为w的网络无法区分超过w+1个复杂对象的组合
人工智能·深度学习·神经网络
星夜Zn1 小时前
生成式人工智能展望报告-欧盟-04-社会影响与挑战
论文阅读·人工智能·大语言模型·发展报告·ai社会影响
余俊晖1 小时前
图像、视频、音频多模态大模型中长上下文token压缩方法综述
人工智能·音视频
LetsonH1 小时前
⭐CVPR2025 FreeUV:无真值 3D 人脸纹理重建框架
人工智能·python·深度学习·计算机视觉·3d
蹦蹦跳跳真可爱5891 小时前
Python----大模型(大模型微调--BitFit、Prompt Tuning、P-tuning、Prefix-tuning、LORA)
人工智能·python·深度学习·自然语言处理·transformer
小杨勇敢飞2 小时前
大语言模型的解码策略:贪婪解码与波束搜索
人工智能·语言模型·自然语言处理
喵王叭2 小时前
【大模型核心技术】Agent 理论与实战
人工智能·langchain
golitter.2 小时前
pytorch的 Size[3] 和 Size[3,1] 区别
人工智能·pytorch·python
乙真仙人2 小时前
数据,正在成为AI大模型最后的护城河
大数据·人工智能·数字化
eric-sjq2 小时前
基于深度学习的图像到文本序列转换技术
人工智能·深度学习