使用指南Usage Guide

用一行命令检测你的硬件适合跑哪个本地大模型。One command to find out which local LLM fits your hardware.

快速开始Quick Start

  1. 打开终端Open a terminal (PowerShell/cmd on Windows, Terminal on Linux/macOS)
  2. Linux / macOS(需 Python 3.7+)Linux / macOS (requires Python 3.7+)
    curl -sL https://whichllm.net/detect.py | python3
    Windows(PowerShell,无需安装)Windows (PowerShell, no install required)
    irm https://whichllm.net/detect.ps1 | iex

    If Python is available: curl.exe -sL .../detect.py | python

    The script auto-detects your GPU, VRAM, and system memory, then matches against the database for the best recommendations.
  3. 查看结果View results The terminal shows your matched GPU, Top-3 model recommendations for each profile (general / coding / vision / math), and upgrade suggestions.
✅ Linux/macOS 用 Python 脚本,Windows 用 PowerShell 一键运行。覆盖全部平台。Python script for Linux/macOS, PowerShell one-liner for Windows. Covers all platforms.

安装 PythonInstalling Python

detect.py 只需要 Python 3.7+(含 3.8~3.13),使用标准库,无需安装任何第三方包。detect.py only needs Python 3.7+ (including 3.8~3.13), uses only the standard library — no third-party packages required.

Windows

  1. 下载安装包:访问 python.org/downloads,点击黄色 "Download Python" 按钮。Visit python.org/downloads, click the yellow "Download Python" button.
  2. 运行安装程序:务必勾选 "Add Python to PATH",然后点击 "Install Now"。Run the installer, check "Add Python to PATH", then click "Install Now".
  3. 验证:重新打开终端,执行 python --version,看到版本号即成功。Verify: reopen terminal, run python --version.

macOS

  1. 终端执行 python3 --version 检查是否已安装。Check if installed: python3 --version
  2. 如未安装:brew install python(需 Homebrew),或访问 python.org/downloads 下载。If not installed: brew install python (requires Homebrew) or download from python.org.
  3. 验证:python3 --versionVerify: python3 --version

Linux

  1. python3 --version 检查是否已安装(Ubuntu/Debian/Fedora 大多预装)。Check if installed (most distros come with Python 3 pre-installed).
  2. 如未安装:If not installed:
    Ubuntu/Debian:sudo apt install python3
    Fedora:sudo dnf install python3
    Arch:sudo pacman -S python
  3. 验证:python3 --versionVerify: python3 --version
💡 大模型也可以帮你安装:把上面的步骤复制给 ChatGPT、Claude 等 AI 助手,它会一步步引导你完成。AI assistants can help too: Paste the steps above into ChatGPT, Claude, etc. and ask them to guide you through the installation.

精确检测(备选方案)Precise Detection (Alternative)

如果一键脚本检测结果不准(例如 GPU 型号显示不完整),可以用原版 Python CLI:If the one-click script gives inaccurate results (e.g., incomplete GPU name), try the original Python CLI:

需要 Python 3.11+ 环境 Requires Python 3.11+
# 方式一:pip 安装 / Option 1: pip install
pip install whichllm
whichllm

# 方式二:uvx 零安装运行(更快)/ Option 2: uvx (faster, no install)
uvx whichllm@latest

原版 whichllm 会调用 NVIDIA Management Library (NVML) 或 AMD ROCm / Apple Metal API 做精确硬件检测,结果更准确。The original whichllm uses NVIDIA Management Library (NVML), AMD ROCm, or Apple Metal API for precise hardware detection.

输出解读Output Guide

  ✅ 匹配到: NVIDIA GeForce RTX 4090 (24 GB · nvidia)

  📐 通用对话 推荐 Top-3:
     1. Qwen3-235B-A22B  — 得分: 92.1
     2. Llama-4-Maverick  — 得分: 89.8
     3. Mistral-Small    — 得分: 87.3

列表中每个推荐包含模型名和综合得分(0-100 分)。得分越高,在该硬件上的推理效果越好。Each recommendation includes the model name and a composite score (0–100). Higher scores mean better inference performance on your hardware.

API 文档 / API Reference

whichllm 提供 REST API,可直接用于程序化查询。所有端点返回 JSON。whichllm provides a REST API for programmatic queries. All endpoints return JSON.

💡 AI / LLM 可直接调用这些 API — 将下面的 curl 示例发给 Claude、ChatGPT 等 AI 助手,它们能自动获取实时排行榜数据。AI assistants can call these APIs directly — share the curl examples with Claude, ChatGPT, etc. to get real-time ranking data.

基础地址 / Base URL

https://whichllm.net

排行榜查询 / Rankings

分页获取排行榜数据,支持多种筛选和排序。Paginated rankings with filtering and sorting.

# Top-10 通用对话排行榜 / Top-10 general conversation rankings
curl 'https://whichllm.net/api/rankings?page=1&limit=10&profile=general&sort=s&dir=desc'

# 搜索特定 GPU / Search specific GPU
curl 'https://whichllm.net/api/rankings?search=RTX+5090&profile=general'

# 筛选显存范围 / Filter by VRAM range (24-48 GB)
curl 'https://whichllm.net/api/rankings?vram_min=24&vram_max=48&sort=v&dir=desc'

热门排行 / Hot & KPI

# 每个 GPU 排名第一的模型 / Top-ranked model per GPU
curl 'https://whichllm.net/api/hot'

# 关键指标总览 / Key metrics overview
curl 'https://whichllm.net/api/kpi'

GPU 检测 / Detect

提交硬件信息获取匹配结果和推荐模型。Submit hardware info to get matched results and model recommendations.

curl -X POST 'https://whichllm.net/api/detect'   -H 'Content-Type: application/json'   -d '{"gpu_name":"RTX 4090","vram_gb":24,"os":"Windows"}'

GPU 对比 / Compare

# 对比两张显卡 / Compare two GPUs
curl 'https://whichllm.net/api/compare?gpu1=RTX+5090&gpu2=RTX+4090&profile=general'

# 查找 VRAM 相近的 GPU / Find similar VRAM GPUs
curl 'https://whichllm.net/api/similar?gpu=rtx-4090&margin=8'

模型查询 / Models

# 指定 GPU 能跑的模型 / Models a specific GPU can run
curl 'https://whichllm.net/api/models?gpu=RTX+4090&limit=5'

# 指定模型的详细信息 / Model details
curl 'https://whichllm.net/api/models/Llama-3-70B'

# 反向查询:指定模型哪些 GPU 能跑 / Reverse lookup: which GPUs can run a model
curl 'https://whichllm.net/api/reverse?model=Qwen&limit=5'

批量查询 / Batch

curl -X POST 'https://whichllm.net/api/batch'   -H 'Content-Type: application/json'   -d '{"gpus":["RTX 5090","RTX 4090","M4 Max"],"profile":"general","limit":3}'

数据导出 / Export

# CSV 格式导出 / Export as CSV
curl 'https://whichllm.net/api/export?format=csv&limit=100'

# 仅导出特定字段 / Export specific fields
curl 'https://whichllm.net/api/export?format=json&fields=gpu,model_id,score&limit=10'

完整 API 文档 / Full API Docs

访问 /api/docs 获取全部 39 个端点的结构化文档(JSON 格式,AI 可直接解析)。Visit /api/docs for full 39-endpoint structured documentation (JSON, AI-parsable).

也支持 OpenAPI 3.0 标准格式:/api/openapi.jsonOpenAPI 3.0 standard format also available: /api/openapi.json

AI 使用场景 / AI Integration

你可以让 AI 助手直接调用 whichllm API 来获取实时数据。例如:AI assistants can call whichllm APIs directly for real-time data. For example:

Prompt 示例 / Example Prompt:
"帮我查一下 RTX 5090 在通用对话场景下能跑什么模型,用 whichllm API:/ Check what models RTX 5090 can run for general conversation:
curl https://whichllm.net/api/models?gpu=RTX+5090&profile=general"

AI 助手会自动调用 API 并解读结果。也可使用 /llms.txt(AI 发现标准文件)让 AI 自动发现所有 API 端点。The AI assistant will call the API and interpret results automatically. Use /llms.txt (AI discovery standard) for automatic endpoint discovery.

常见问题 / FAQ

检测结果显示"未匹配到数据库记录" / "No matching database record"
说明你的 GPU 型号可能不在当前数据库中,或型号名不完整。试试网页版手动搜索,或在终端运行 pip install whichllm && whichllm 做精确检测。Your GPU model may not be in the database, or the name is incomplete. Try searching on the web or run pip install whichllm && whichllm for precise detection.
没有 GPU,只有 CPU / No GPU, only CPU
依然可以运行本地 LLM,只是速度较慢。数据库中有纯 CPU 可运行的模型,搜索时会自动匹配。You can still run local LLMs on CPU, though slower. The database includes CPU-compatible models.
Windows 用户怎么运行? / How to run on Windows?
打开 PowerShell,直接粘贴:Open PowerShell and paste:
irm https://whichllm.net/detect.ps1 | iex
PowerShell will auto-download and run — no installation needed.
数据多久更新一次? / How often is data updated?
数据每天凌晨自动从 HuggingFace 更新,包含最新的基准测试结果。Data updates daily from HuggingFace with the latest benchmark results.
推荐结果不准怎么办? / Inaccurate recommendations?
whichllm 的基准测试数据来自 HuggingFace、LiveBench、Aider 等公开来源。如有更新数据,欢迎提交 PR 到 GitHub 仓库Benchmark data comes from public sources (HuggingFace, LiveBench, Aider). Submit a PR to our GitHub repo with updated data.