nano-vllm环境安装

nano-vllm简介

大模型基础

nano-vllm

云环境选择

优云智算 - 简单、可靠、高性价比的GPU云平台

镜像的选择非常重要,因为nano-vllm需要安装flash_attn。flash_attn需要特定的环境

flash_attn:flash_atten release包github下载

https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3.post1/flash_attn-2.8.3.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl上述镜像刚好是

cuda12 torch2.4 cxx11 abi:false python3.10

安装必要依赖

1. apt 清华镜像源

替换/etc/apt/sources.list

bash 复制代码
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

# 以下安全更新软件源为官方源配置
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

2. 安装系统依赖包

bash 复制代码
apt update && apt install -y git ninja-build build-essential zip unzip  pciutils

3.安装python包

bash 复制代码
pip install tqdm transformers xxhash nvitop

安装flash_atten

不要直接pip install,会编译很久,从github上找适合当前环境的包

https://github.com/Dao-AILab/flash-attention/releases?page=1#release-v2.8.3.post1

flash_attn-2.8.3.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

下载模型

bash 复制代码
huggingface-cli download Qwen/Qwen2.5-0.5B-Instruct \
    --local-dir /root/huggingface/Qwen3-0.6B/ \
    --local-dir-use-symlinks False

跑nano-vllm example

bash 复制代码
git clone https://github.com/GeeeekExplorer/nano-vllm.git
cd nano-vllm
python exmaple.py
相关推荐
陈 洪 伟4 天前
大模型推理引擎vLLM(39):CUDAGraph模式以及CUDAGraphWrapper和BreakableCUDAGraphWrapper问题整理
vllm
论文复现现场4 天前
A100 跑 Qwen3.8-27B,FP8 还是 INT8?显存、速度、精度与微调兼容性怎么选
模型量化·vllm·a100·大模型部署·int8·fp8·qwen3.8
Zhu7584 天前
docker环境,vLLM 部署 Qwen3.8-27B
docker·qwen·vllm
basketball6165 天前
Python FastAPI 介绍以及常用方法
python·fastapi·vllm·ai infra
论文复现现场5 天前
RTX 3090 如何跑 13B 级大模型推理?4-bit AWQ、vLLM 部署与并发调优实战
模型量化·vllm·大模型推理·awq·算家云·rtx3090
一颗小树x6 天前
vLLM大模型推理:Jetson AGX Thor 的 GPU 共享内存清理实战
jetson·vllm·vlm·gpu内存清理
论文复现现场7 天前
Qwen3.8-27B 做 GRPO 需要几张 GPU?4×RTX 4090 与 8×RTX 4090 显存、vLLM 和 ZeRO-3 配置分析
deepspeed·qlora·大模型训练·vllm·rtx4090·grpo·qwen3.8
安易算力7 天前
昇腾生态开发深度实践:CANN算子库架构解析与MindSpore模型优化
网络·容器·架构·kubernetes·vllm
SunnyRivers7 天前
vLLM 官方调优方案
优化·vllm
政企项目老覃8 天前
边缘 AI 推理部署:安防零售场景下的模型裁剪与端侧落地实践
人工智能·程序人生·算法·性能优化·vllm