智能本地大模型推荐与硬件匹配引擎
Smart Local LLM Recommendation & Hardware Matching Engine
LLM-Finder 是一款轻量级命令行工具,能够自动检测你的硬件配置(CPU、GPU、内存),并基于真实基准测试数据智能推荐最适合你设备的本地大语言模型。
不再纠结于"我的显卡能跑哪个模型"——一条命令,LLM-Finder 为你找到最佳选择。
本项目灵感来源于 GitHub 热门项目 whichllm,在其基础上进行了差异化创新:
- 🎯 内置中文 LLM 生态模型库(Qwen、GLM、DeepSeek、Yi 等)
- 📊 多维度评分系统(兼容性 + 性能 + 中文加成)
- 🔄 模型对比功能
- 💰 本地推理成本估算器
- 🏷️ 一键生成 Ollama / llama.cpp 运行命令
| 特性 | 说明 |
|---|---|
| 🔍 自动硬件检测 | 检测 NVIDIA/AMD/Apple Silicon GPU、CPU、内存 |
| 📊 智能推荐引擎 | 基于兼容性和性能的多维度评分 |
| 🌏 中文生态支持 | 内置 Qwen、GLM、DeepSeek、Yi 等中文优化模型 |
| 📦 多量化格式 | 支持 Q2/Q3/Q4/Q5/Q8/FP16 多种量化 |
| 🔄 模型对比 | 多模型基准测试数据并排对比 |
| 💰 成本估算 | 估算本地推理电力成本 vs API 费用 |
| 🚀 一键运行 | 生成 Ollama/llama.cpp/LM Studio 运行命令 |
| 🖥️ 美观 TUI | Rich 驱动的精美终端界面 |
| ⚡ 零依赖核心 | 核心功能仅需 Python 标准库 + Rich + Click |
| 🎮 GPU 模拟 | 支持 --gpu "RTX 4090" 模拟任意显卡 |
pip install llm-finder或从源码安装:
git clone https://github.com/gitstq/LLM-Finder.git
cd LLM-Finder
pip install -e .llm-finder自动检测硬件并推荐最适合的模型!
llm-finder recommend --gpu "RTX 4090 24GB"llm-finder recommend --chinese| 命令 | 说明 |
|---|---|
llm-finder |
一键推荐(默认) |
llm-finder recommend |
智能推荐 |
llm-finder list-models |
列出所有模型 |
llm-finder compare <模型1> <模型2> |
对比模型 |
llm-finder search <关键词> |
搜索模型 |
llm-finder hardware |
显示硬件信息 |
llm-finder vram <参数量> |
估算显存需求 |
llm-finder run <模型名> |
生成运行命令 |
llm-finder cost <模型名> |
估算推理成本 |
llm-finder categories |
显示模型分类 |
# 按分类推荐
llm-finder recommend --category coding
# 限制参数量
llm-finder recommend --max-params 10
# 搜索关键词
llm-finder recommend --query "qwen"
# 显示更多推荐
llm-finder recommend --top 10llm-finder compare llama-3.1-8b-instruct qwen2.5-7b-instruct glm-4-9b-chatllm-finder vram 70 # 估算70B模型的显存需求llm-finder cost llama-3.1-8b-instruct --hours 12| 模型 | 参数量 | 上下文 | 架构 | 许可证 |
|---|---|---|---|---|
| Llama 3.1 8B Instruct | 8B | 128K | Llama | Llama 3.1 Community |
| Llama 3.1 70B Instruct | 70B | 128K | Llama | Llama 3.1 Community |
| Qwen2.5 7B Instruct | 7.6B | 128K | Qwen | Apache 2.0 |
| Qwen2.5 14B Instruct | 14.8B | 128K | Qwen | Apache 2.0 |
| Qwen2.5 32B Instruct | 32.5B | 128K | Qwen | Apache 2.0 |
| Mistral 7B Instruct v0.3 | 7.2B | 32K | Mistral | Apache 2.0 |
| Mixtral 8x7B Instruct | 46.7B | 32K | Mistral (MoE) | Apache 2.0 |
| Gemma 2 9B IT | 9.2B | 8K | Gemma | Gemma License |
| Gemma 2 27B IT | 27.2B | 8K | Gemma | Gemma License |
| GLM-4 9B Chat | 9B | 128K | GLM | Apache 2.0 |
| Yi-1.5 9B Chat | 9B | 4K | Yi | Apache 2.0 |
| 模型 | 参数量 | 上下文 | 许可证 |
|---|---|---|---|
| DeepSeek-Coder-V2 Lite | 16B | 128K | DeepSeek License |
| Codestral 22B | 22B | 32K | Mistral AI NLC |
| StarCoder2 15B Instruct | 15B | 16K | BigCode OpenRAIL-M |
| 模型 | 参数量 | 上下文 | 许可证 |
|---|---|---|---|
| Phi-3 Mini 128K | 3.8B | 128K | MIT |
| Phi-3 Medium 128K | 14B | 128K | MIT |
| 模型 | 参数量 | 上下文 | 许可证 |
|---|---|---|---|
| MiniCPM-V 2.6 | 8B | 128K | Apache 2.0 |
- 数据驱动推荐 — 基于真实基准测试数据(Arena ELO、LiveBench、HumanEval、GSM8K),而非简单的参数量排序
- 硬件感知 — 自动检测硬件配置,精确判断模型是否能运行、以何种方式运行
- 中文优先 — 内置主流中文 LLM 模型,为中国开发者优化
- 零配置 — 开箱即用,无需 API Key 或账号
- v1.1: 支持从 HuggingFace API 动态获取模型数据
- v1.2: 添加交互式 TUI 界面(基于 Textual)
- v1.3: 支持 MLC/llama.cpp 自动下载和运行
- v2.0: 添加模型性能实时基准测试功能
pip install llm-findergit clone https://github.com/gitstq/LLM-Finder.git
cd LLM-Finder
pip install -e .pip install -e ".[dev]"
pytest tests/ -v- Python 3.10+
- 操作系统:Linux / macOS / Windows
- GPU 检测(可选):NVIDIA GPU + nvidia-smi / Apple Silicon / AMD ROCm
欢迎贡献!请阅读 CONTRIBUTING.md 了解详情。
- Fork 本仓库
- 创建特性分支 (
git checkout -b feature/amazing-feature) - 提交更改 (
git commit -m 'feat: add amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 创建 Pull Request
本项目基于 MIT License 开源。
内置的模型数据来源于各模型官方发布的基准测试结果和公开排行榜数据,仅供参考。
