vllm

vllm is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 121 tokens per session (4,346 once invoked), scanned A, original, MIT.

Use when self-hosting an OpenAI-compatible LLM endpoint with vLLM 0.32 — vllm serve, offline LLM.generate / llm.chat, PagedAttention with continuous batching and prefix caching, --tensor-parallel-size / --pipeline-parallel-size, AWQ/GPTQ/FP8 quantization, or wiring LangChain/LlamaIndex clients at…

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/vllm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill vllm
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vllm

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/vllm/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/vllm)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/vllm"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/vllm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vllm

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/vllm"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/vllm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,346 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00121 $0.04346
Opus 5.5 $0.00048 $0.01738
Sonnet 5.5 $0.00024 $0.00869
Haiku 4.5 $0.00012 $0.00435

Measured today against content hash 994628e3ee1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vllm scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:8000/v1/models
ai/vllm/SKILL.md · 334 lines

How it starts

The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/vllm-project/vllm

官方文档: https://docs.vllm.ai/

PyPI: vllm(0.32.0,截至 2026-10)

许可证: Apache-2.0

概述

vLLM 是目前最主流的开源 LLM 推理与服务平台,把"高吞吐、低延迟、OpenAI 兼容"三件事一次做掉。

  • PagedAttention:KV cache 按页管理,显存碎片少、并发高
  • Continuous batching / chunked prefill / prefix caching:连续批处理、分块预填充、前缀复用
  • 量化:FP8、MXFP8/MXFP4、NVFP4、INT8、INT4、GPTQ/AWQ、GGUF、compressed-tensors、ModelOpt、TorchAO 等
  • 并行:tensor / pipeline / data / expert / context 并行,支持多机
  • OpenAI 兼容 API:/v1/models、/v1/completions、/v1/chat/completions,另支持 Anthropic Messages API 与 gRPC
  • 模型面广:200+ Hugging Face 架构(Llama / Qwen / Gemma / Mixtral / DeepSeek-V3 / Qwen-MoE / GPT-OSS / Mamba / 多模态 / embedding / reward)
  • 硬件:NVIDIA、AMD、Intel GPU,x86/ARM/PowerPC CPU,以及 TPU / Gaudi / Ascend 等插件

环境准备

前置条件

项 要求
操作系统 Linux(macOS 需走 vLLM-Metal;Windows 建议 WSL2 + Linux 容器)
Python 3.11 – 3.14
GPU NVIDIA 需匹配的 CUDA 驱动;AMD 走 ROCm wheel;Intel 走 XPU
磁盘 模型权重 + 编译产物,几十 GB 起步

方式一:uv(官方推荐)

uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernels

--torch-backend=auto 会按驱动版本自动选 PyTorch 源;也可写死 --torch-backend=cu126。vllm download-kernels 预编译 kernel,避免首次启动在 Hopper 及以上卡上编译几分钟。

方式二:pip / conda

# pip
python -m pip install vllm

# conda
conda create -n vllm python=3.12 -y
conda activate vllm
pip install --upgrade uv
uv pip install vllm --torch-backend=auto

方式三:不改环境直接试

uv run --with vllm vllm --help

其他硬件

# AMD ROCm(支持 Python 3.12、ROCm 7.0、glibc >= 2.35)
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/

# Google TPU
uv pip install vllm-tpu

Apple Silicon 用 vLLM-Metal;Ascend NPU 用 vllm-ascend。

验证

vllm --version
vllm serve --help | head -30

离线批量推理

from vllm import LLM, SamplingParams

prompts = [
    "Hello, my name is",
    "The president of the United States is",
    "The capital of France is",
    "The future of AI is",
]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)

llm = LLM(model="facebook/opt-125m")
outputs = llm.generate(prompts, sampling_params)

for output in outputs:
    print(f"Prompt: {output.prompt!r}")
    print(f"Generated: {output.outputs[0].text!r}")

Read the full file on GitHub · 334 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 334 lines · 121 tokens per session scan A 994628e3ee1d

Subscribe to this mod's changes

vllm is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed today), licensed MIT. It adds 121 tokens to every session and 4,346 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.

Related

Other skills, from other repositories