llmfit:一行命令查找硬件可运行的本地大语言模型
llmfit 是一个开源命令行工具,可检测 CPU、系统内存、GPU、VRAM 与加速器配置,并从数百个模型和提供方中推荐适合本机运行的 LLM,支持 TUI、CLI、Web UI、REST API、多 GPU、MoE、动态量化选择、速度估算以及本地运行时提供方。
社区作者 · zZz
它解决什么问题
llmfit 用于判断哪些开源大语言模型(LLM)可以在当前硬件上舒适运行。它会检查 CPU、系统 RAM、GPU、VRAM 和加速器配置,并跨常见量化格式推荐模型。
核心功能:
- 硬件自动检测:检测 CPU 核心数、系统 RAM、可用的独立/集成 GPU、VRAM 以及统一内存架构,支持 NVIDIA CUDA、Apple Silicon、AMD ROCm、Intel OneAPI。
- 模型兼容性引擎:分析模型参数量、上下文长度和量化格式(GGUF、AWQ、GPTQ、EXL2),预估内存占用与 tokens-per-second 性能。
- 交互式 TUI 与 Web 仪表盘:可选择轻量、零依赖的终端界面,或功能丰富的 Web 仪表盘。
- REST API 端点:暴露标准 HTTP JSON 端点(/api/v1/system、/api/v1/models),可集成到编排器、仪表盘和自动化部署管线。
- 多平台支持:macOS(Apple Silicon 与 Intel)、Linux(x86_64 与 ARM64)、Windows(x86_64)。
- 多 GPU 配置、MoE 架构、动态量化选择、速度估算,以及本地运行时提供方:Ollama、llama.cpp、MLX、Docker Model Runner、LM Studio。
工作方式:llmfit 检测硬件(RAM、CPU、GPU/VRAM、后端),然后从内存适配、预估速度、质量、上下文四个维度为目录中的每个模型评分。速度估算来自基于内存带宽的模型,并以运行时采样和真实社区测量为基础;每次估算都会附带输入,llmfit info 会显示某个数字基于哪些假设以及如何在本机验证。
基准测试与社区:可以下载模型、提供服务并测量本机真实 tok/s,然后直接从 TUI 以 PR 形式把结果贡献回项目。每次运行会先保存在本地,自己的测量值会替换适配表中的估算值。
姊妹项目:sympozium(在 Kubernetes 中管理 agent)、llmserve(服务本地 LLM 模型的简单 TUI)、llama-panel(管理本地 llama-server 实例的原生 macOS 应用)、llmfit-gui(Windows 桌面 GUI,使用 PowerShell + WinForms,可浏览推荐、下载到 LM Studio/Ollama 并基准测试)。
替代品:llm-checker 是一个带 Ollama 集成的 Node.js CLI 工具,可以直接拉取并基准测试模型;它更偏向通过 Ollama 实际运行模型,而不是根据规格估算。注意它不支持 MoE(Mixture-of-Experts)架构,所有模型都按 dense 处理,因此 Mixtral 或 DeepSeek-V3 等模型的内存估算会反映总参数量,而不是较小的激活子集。
代码签名:Windows release 二进制通过 Sign
— 本文由 AI 根据公开来源辅助整理,命令、版本与许可证请在使用前到原始页面复核。
安装 / 开始使用
Install · Usage · How it works Guides TUI guide · Benchmarking step-by-step · CLI & automation · Runtime providers · OpenClaw integration Reference How it works (full) · Platform & GPU support · Custom models · Development Project Contributing · Alternatives · Code signing · License Install Windows
scoop install llmfitIf Scoop is not installed, follow the Scoop installation guide . macOS / Linux Homebrew Prebuilt binary (recommended, works on all macOS/Linux versions):
brew install AlexsJones/llmfit/llmfitOr from the homebrew-core formula, which builds from source on macOS versions without a bottle:
brew install llmfitMacPorts port install llmfit Quick install
curl -fsSL https://llmfit.axjns.dev/install.sh | shDownloads the latest release binary from GitHub and installs it to /usr/local/bin (or ~/.local/bin if no sudo). Install to ~/.local/bin without sudo:
curl -fsSL https://llmfit.axjns.dev/install.sh | sh -s -- --localuv / pipTo install or update llmfit:
uv tool install -U llmfitTo run without installing: uvx llmfit You can also install llmfit as a Python package in the normal way with tools such as pip or uv. Pre-built Binaries Download signed release binaries for Linux, macOS, and Windows directly from the GitHub Releases page.
Container Deployment llmfit provides a multi-architecture Docker image ( ghcr.io/alexsjones/llmfit ) supporting both interactive CLI/TUI and headless Web UI / API server modes. Interactive TUI To launch the interactive TUI instead, pass the global --tui flag:
docker run -it --rm ghcr.io/alexsjones/llmfit --tuiNon-Interactive This prints JSON from llmfit recommend command.
docker run ghcr.io/alexsjones/llmfitThis prints JSON from llmfit recommend command. The JSON could be further queried with jq .
podman run ghcr.io/alexsjones/llmfit recommend --use-case coding | jq '.models[].name'To launch the interactive TUI instead, pass the global --tui flag:
docker run --rm -it ghcr.io/alexsjones/llmfit --tuiFrom source
git clone https://github.com/AlexsJones/llmfit.gitcd llmfitcargo build --releasebinary is at target/release/llmfit
Usage Terminal Interface (TUI) Launch llmfit in your terminal without flags to start the interactive browser: llmfit # interactive TUI: your hardware, every model, ranked The TUI shows your detected specs at the top and every model scored for fit, speed, quality, and context.
See the TUI guide for navigation, planning, simulation, downloads, the community leaderboard, and benchmarking. Keybindings inside the TUI:
Command Line Options
- b : Open community benchmarks; I : Open live inference benchmarks
- h : Show help and keybindings
- ↑ / ↓ or k / j : Navigate list items
- / : Filter models by name, family, or quantization
- Esc : Clear search / Back
Print hardware telemetry and recommended models to standard output
llmfit recommend
Output system profile and recommendations in raw JSON format
llmfit recommend --json
Start the native HTTP API server
llmfit serve --host 0.0.0.0 --port 8787 Web UI & API Server
docker run -d -p 8787:8787 ghcr.io/alexsjones/llmfit serveDocker Compose--- services : llmfit : image : ghcr.io/alexsjones/llmfit:latest container_name : llmfit restart : unless-stopped command : ["serve", "--host", "0.0.0.0", "--port", "8787"] ports :
healthcheck : test : ["CMD", "curl", "-f", "http://localhost:8787/health"] interval : 15s timeout : 5s retries : 3 start_period : 10s For scripts, agents, and classic terminal output: llmfit fit # table of all models ranked by fit llmfit recommend --json # top picks as JSON (agent/script consumption) llmfit info " <model> " # one model: fit analysis, estimate basis, verify commands llmfit bench # measure real tok/s/TTFT against your running provider
- " 8787:8787 "