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
相关推荐
Hui Baby1 天前
VLLM部署大模型常用参数介绍
vllm
吴佳浩 Alben1 天前
一文看懂大模型推理为什么需要多卡:从 TP、DP 到 Runtime 的完整演进
运维·服务器·人工智能·深度学习·语言模型·vllm·sglang
智码看视界3 天前
开源大模型追踪:Qwen3-VL-30B-A3B :30B 总参单卡到底能不能跑?
多模态·视觉语言模型·本地部署·vllm·moe·开源大模型·qwen3-vl
小易老师AI实战3 天前
多模型融合实战:大模型+轻量小模型混合部署
vllm·大模型部署·模型路由·多模型融合·llm工程化·ai降本增效
chenxy023 天前
提高大模型推理性能的思路
vllm
吴佳浩 Alben3 天前
一文讲透推理引擎性能指标:TTFT、TPOT、KV命中率、并发,到底对应 vLLM / SGLang 的哪个参数?
人工智能·python·语言模型·架构·ai编程·vllm·sglang
Light Gao5 天前
从 LoRA 到 vLLM:大模型训练与企业部署名词通识(图解版)
vllm
数据与后端架构提升之路5 天前
四个模型,四条路:一份来自生产环境的 LLM 部署横评与选型框架
gpu算力·vllm·h100
缘友一世6 天前
GLM5.3 flash cybersec本地部署[5]:生产运维与故障恢复
ubuntu·vllm·glm5.3 flash