vllm-cli

Chen-zexiMIT更新放缓

用命令行一键启动 vLLM 的 LLM 推理服务,省去手写配置和启动脚本的麻烦,适合快速部署和测试模型。

A command-line interface tool for serving LLM using vLLM.

v0.2.5发布于 2025-08-25 13:46 UTC506star30fork同步于 2026-11-07 07:28 UTC

怎么上手

由 README 提炼,执行前请确认
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
uv pip install --upgrade vllm-cli
uv run vllm-cli
硬件要求按 README 说明

README 建议使用 CUDA 兼容 GPU,并列出针对 NVIDIA A100、H100/H200、Blackwell 的优化配置档;未给出具体显存数值,也未说明是否支持纯 CPU 运行。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 vLLM 起 LLM 服务的命令行工具,带交互菜单、配置档和模型管理

用命令行一键启动 vLLM 的 LLM 推理服务,省去手写配置和启动脚本的麻烦,适合快速部署和测试模型。

核心能力

  • 提供交互式菜单和直接 CLI 命令两种使用方式
  • 自动发现 HuggingFace 与 Ollama 本地模型
  • 内置 7 个配置档,含 A100/H100/Blackwell 专用档
  • 实时监控运行中的 vLLM 服务与 GPU、CUDA 状态
  • 实验性多模型代理,单端点动态增删模型

容易踩的坑

默认不安装 vLLM 和 PyTorch,需自行安装且 CUDA 内核须与 PyTorch 版本严格匹配;pipx 隔离环境可能与 vLLM 的 CUDA 依赖冲突,建议用 uv 或 conda;多模型代理仍是实验性功能,不建议直接用于生产。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.5
  1. v0.2.5最新正式版2025-08-25 · 2025-08-25 13:46 UTC

    Added

    • Multi-Model Proxy Server (Experimental): Enabling multiple LLMs through a single unified API endpoint
      • Single OpenAI-compatible endpoint for all models
      • Request routing based on model name
      • Save and reuse proxy configurations
    • Dynamic Model Management: Add or remove models at runtime without restarting the proxy
      • Live model registration and unregistration
      • Pre-registration with verification lifecycle
      • Graceful handling of model failures without affecting other models
      • Model state tracking (pending, running, sleeping, stopped)
    • Model Sleep/Wake for GPU Memory Management: Efficient GPU resource distribution
      • Sleep Level 1: CPU offload for faster wake-up
      • Sleep Level 2: Full memory discard for maximum savings
      • Real-time memory usage tracking and reporting
      • Models maintain their ports while sleeping
    • Test Coverage: Added comprehensive tests for multi-model proxy and model registry

    Changed

    • Improved error handling with detailed logs when PyTorch is not installed
    • Better server cleanup and process management

    Fixed

    • UI navigation improvements and minor display fixes
  2. v0.2.5rc2pre-release2025-08-24 · 2025-08-24 22:10 UTC
    查看更新说明

    Multi-Model Proxy Server (Experimental)

    The Multi-Model Proxy is a new experimental feature that enables serving multiple LLMs through a single unified API endpoint. This feature is currently under active development and available for testing.

    What It Does:

    • Single Endpoint - All your models accessible through one API
    • Live Management - Add or remove models without stopping the service
    • Dynamic GPU Management - Efficient GPU resource distribution through vLLM's sleep/wake functionality
    • Interactive Setup - User-friendly wizard guides you through configuration

    You can install the pre-release version with:

    pip install --pre --upgrade vllm-cli
    
  3. v0.2.5rc1pre-release2025-08-22 · 2025-08-22 04:26 UTC
    查看更新说明

    Added multi model support through proxy

  4. v0.2.42025-08-20 · 2025-08-20 16:43 UTC
    查看更新说明

    Added

    • Hardware-Optimized Profiles for GPT-OSS Models: New built-in profiles optimized for different GPU architectures
      • gpt_oss_ampere: Optimized for NVIDIA A100 GPUs
      • gpt_oss_hopper: Optimized for NVIDIA H100/H200 GPUs
      • gpt_oss_blackwell: Optimized for NVIDIA Blackwell (B100/B200) GPUs
      • Based on official vLLM GPT recipes
    • Shortcuts System: Save and quickly launch model + profile combinations
      • Quick launch from CLI: vllm-cli serve --shortcut NAME
      • Manage shortcuts through interactive mode or CLI commands
      • Import/export shortcuts for sharing configurations
    • Ollama Model Support: Full integration with Ollama-downloaded models
      • Automatic discovery in user (~/.ollama) and system (/usr/share/ollama) directories
      • GGUF format detection and experimental serving support
    • Environment Variable Management: Two-tier system for complete control
      • Universal environment variables for all servers
      • Profile-specific environment variables (override universal)
      • Clear indication of environment sources when launching
    • GPU Selection: Select specific GPUs for model serving
      • CLI: --device 0,1 to use specific GPUs
      • Interactive UI for GPU selection in advanced settings
      • Automatic tensor_parallel_size adjustment
    • Enhanced System Information: vLLM built-in feature detection
      • Detailed attention backend availability (Flash Attention 2/3, xFormers)
      • Feature compatibility checking per backend
    • Server Cleanup Control: Configure server behavior on CLI exit
    • Extended vLLM Arguments: Added 16+ new arguments for v1 engine
      • Performance, optimization, API, configuration, and monitoring options

    Changed

    • Enhanced Quick Serve menu shows last configuration and saved shortcuts
    • Model field excluded from profiles for model-agnostic templates
    • Model cache refresh properly respects TTL settings (>60s)
    • Environment variables available in Custom Configuration menu

    Fixed

    • Fixed manual cache refresh functionality
    • Fixed profile creation inconsistency between menus
    • Fixed UI consistency issues with prompt formatting
  5. v0.2.4rc2pre-release2025-08-19 · 2025-08-19 23:08 UTC
    查看更新说明

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    vLLM CLI

    CI Release PyPI version License: MIT Python 3.9+ PyPI Downloads

    A command-line interface tool for serving Large Language Models using vLLM. Provides both interactive and command-line modes with features for configuration profiles, model management, and server monitoring.

    vLLM CLI Welcome Screen Interactive terminal interface with GPU status and system overview Tip: You can customize the GPU stats bar in settings

    Features

    • 🎯 Interactive Mode - Rich terminal interface with menu-driven navigation
    • ⚡ Command-Line Mode - Direct CLI commands for automation and scripting
    • 🤖 Model Management - Automatic discovery of local models with HuggingFace and Ollama support
    • 🔧 Configuration Profiles - Pre-configured and custom server profiles for different use cases
    • 📊 Server Monitoring - Real-time monitoring of active vLLM servers
    • 🖥️ System Information - GPU, memory, and CUDA compatibility checking
    • 📝 Advanced Configuration - Full control over vLLM parameters with validation

    Quick Links: 📖 Docs | 🚀 Quick Start | 📸 Screenshots | 📘 Usage Guide | ❓ Troubleshooting | 🗺️ Roadmap

    What's New in v0.2.5

    Multi-Model Proxy Server (Experimental)

    The Multi-Model Proxy is a new experimental feature that enables serving multiple LLMs through a single unified API endpoint. This feature is currently under active development and available for testing.

    What It Does:

    • Single Endpoint - All your models accessible through one API
    • Live Management - Add or remove models without stopping the service
    • Dynamic GPU Management - Efficient GPU resource distribution through vLLM's sleep/wake functionality
    • Interactive Setup - User-friendly wizard guides you through configuration

    Note: This is an experimental feature under active development. Your feedback helps us improve! Please share your experience through GitHub Issues.

    For complete documentation, see the 🌐 Multi-Model Proxy Guide.

    What's New in v0.2.4

    🚀 Hardware-Optimized Profiles for GPT-OSS Models

    New built-in profiles specifically optimized for serving GPT-OSS models on different GPU architectures:

    • gpt_oss_ampere - Optimized for NVIDIA A100 GPUs
    • gpt_oss_hopper - Optimized for NVIDIA H100/H200 GPUs
    • gpt_oss_blackwell - Optimized for NVIDIA Blackwell GPUs

    Based on official vLLM GPT recipes for maximum performance.

    ⚡ Shortcuts System

    Save and quickly launch your favorite model + profile combinations:

    vllm-cli serve --shortcut my-gpt-server
    

    🦙 Full Ollama Integration

    • Automatic discovery of Ollama models
    • GGUF format support (experimental)
    • System and user directory scanning

    🔧 Enhanced Configuration

    • Environment Variables - Universal and profile-specific environment variable management
    • GPU Selection - Choose specific GPUs for model serving (--device 0,1)
    • Enhanced System Info - vLLM feature detection with attention backend availability

    See CHANGELOG.md for detailed release notes.

    Quick Start

    Important: vLLM Installation Notes

    ⚠️ Binary Compatibility Warning: vLLM contains pre-compiled CUDA kernels that must match your PyTorch version exactly. Installing mismatched versions will cause errors.

    vLLM-CLI will not install vLLM or Pytorch by default.

    Installation

    Option 1: Install vLLM seperately and then install vLLM CLI (Recommended)
    # Install vLLM -- Skip this step if you have vllm installed in your environment
    uv venv --python 3.12 --seed
    source .venv/bin/activate
    uv pip install vllm --torch-backend=auto
    # Or specify a backend: uv pip install vllm --torch-backend=cu128
    
    # Install vLLM CLI
    uv pip install --upgrade vllm-cli
    uv run vllm-cli
    
    # If you are using conda:
    # Activate the environment you have vllm installed in
    pip install vllm-cli
    vllm-cli
    
    Option 2: Install vLLM CLI + vLLM
    # Install vLLM CLI + vLLM
    pip install vllm-cli[vllm]
    vllm-cli
    
    Option 3: Build from source (You still need to install vLLM seperately)
    git clone https://github.com/Chen-zexi/vllm-cli.git
    cd vllm-cli
    pip install -e .
    
    Option 4: For Isolated Installation (pipx/system packages)

    ⚠️ Compatibility Note: pipx creates isolated environments which may have compatibility issues with vLLM's CUDA dependencies. Consider using uv or conda (see above) for better PyTorch/CUDA compatibility.

    # If you do not want to use virtual environment and want to install vLLM along with vLLM CLI
    pipx install "vllm-cli[vllm]"
    
    # If you want to install pre-release version
    pipx install --pip-args="--pre" "vllm-cli[vllm]"
    

    Prerequisites

    • Python 3.9+
    • CUDA-compatible GPU (recommended)
    • vLLM package installed
    • For dependency issues, see Troubleshooting Guide

    Basic Usage

    # Interactive mode - menu-driven interface
    vllm-cli
    # Serve a model
    vllm-cli serve --model openai/gpt-oss-20b
    
    # Use a shortcut
    vllm-cli serve --shortcut my-model
    

    For detailed usage instructions, see the 📘 Usage Guide and 🌐 Multi-Model Proxy Guide.

    Configuration

    Built-in Profiles

    vLLM CLI includes 7 optimized profiles for different use cases:

    General Purpose:

    • standard - Minimal configuration with smart defaults
    • high_throughput - Maximum performance configuration
    • low_memory - Memory-constrained environments
    • moe_optimized - Optimized for Mixture of Experts models

    Hardware-Specific (GPT-OSS):

    • gpt_oss_ampere - NVIDIA A100 GPUs
    • gpt_oss_hopper - NVIDIA H100/H200 GPUs
    • gpt_oss_blackwell - NVIDIA Blackwell GPUs

    See 📋 Profiles Guide for detailed information.

    Configuration Files

    • Main Config: ~/.config/vllm-cli/config.yaml
    • User Profiles: ~/.config/vllm-cli/user_profiles.json
    • Shortcuts: ~/.config/vllm-cli/shortcuts.json

    Documentation

    Integration with hf-model-tool

    vLLM CLI uses hf-model-tool for model discovery:

    • Comprehensive model scanning
    • Ollama model support
    • Shared configuration

    Development

    Project Structure

    src/vllm_cli/
    ├── cli/           # CLI command handling
    ├── config/        # Configuration management
    ├── models/        # Model management
    ├── server/        # Server lifecycle
    ├── ui/            # Terminal interface
    └── schemas/       # JSON schemas
    

    Contributing

    Contributions are welcome! Please feel free to open an issue or submit a pull request.

    License

    MIT License - see LICENSE file for details.