Tries to pick the best local llm for your computer and environment.
Project description
bestllm
Picks the most capable local LLM your machine can comfortably run, with zero guesswork.
bestllm is a hardware-aware companion inspired by Timothy Crosley's developer tools. It inspects your system, compares it against curated model profiles, and returns the right local model for the job—no spreadsheet required.
Highlights
- Understands your hardware with lightweight, cross-platform detection.
- Ships with curated GPU and CPU friendly GGUF profiles and their resource budgets.
- Provides a friendly CLI plus a composable Python API for deeper integrations.
- Fails fast with actionable messages when your machine does not meet a model's needs.
- Designed to be extended: drop in new profiles or swap out detectors without rewriting core logic.
Quick Start
Installation
python -m pip install -e .
Need dev tooling too? Grab the extras:
uv pip install --group dev .
Run the CLI
bestllm
# or
python -m bestllm
Expect output similar to:
Recommended model: llama3-8b-instruct-q4 (8,192 token context window).
Summary: requires >= 16GB RAM, >= 4 CPU cores, 10 GPU VRAM requirement.
Detected GPU VRAM: 12GB — using GPU-friendly profile.
Use from Python
from bestllm import best_local_llm
profile = best_local_llm()
print(profile.name)
print(profile.as_dict())
How It Works
bestllm.hardware.HardwareSpecscaptures total RAM, CPU cores, and GPU VRAM.bestllm.modelsdefines the catalog ofModelProfileobjects (size, context window, and resource requirements).bestllm.selector.recommend_model_for_specsscores the catalog against your hardware and raises a clear error if nothing fits.bestllm.__init__exposes a minimal API and wires everything into the console script entry point.
Extending the Model Catalog
- Open
src/bestllm/models.pyand add aModelProfiletoDEFAULT_MODEL_PROFILES. - Document resource requirements and noteworthy constraints in the
notesfield. - Re-run
bestllmto confirm the new profile appears when the hardware qualifies. - Add targeted tests under
tests/models/(mirroring thesrc/bestllmlayout) to lock down the new behavior.
Configuration Tips
- Pair bestllm with your runner scripts to auto-pick the right
gguffile before launch. - Override hardware detection in constrained environments by instantiating
HardwareSpecsmanually and passing it torecommend_model_for_specs. - Guard long-context models behind feature flags so CI and lightweight machines stick to CPU options.
Roadmap
- Smarter scoring that accounts for quantization preferences and batching strategies.
- Built-in adapters for popular launchers (Ollama, llama.cpp, vLLM) via optional extras.
- Configurable profile sources (TOML/JSON) so catalogs can live outside the codebase.
- Hardware detection helpers for AMD and Apple GPUs without shelling out to vendor tools.
Contributing
- Ensure
ruff check srcandty srcpass before sending a PR. - Keep new features isolated in their own modules under
src/bestllm/and surface them throughbestllm.__init__. - Add or update
tests/alongside feature changes; we mirror the runtime package layout for discovery. - Share CLI transcripts or screenshots when behavior changes—context speeds up reviews.
Inspiration & Credits
bestllm follows the pragmatic tooling ethos of Timothy Crosley projects: approachable defaults, thoughtful ergonomics, and extensibility baked in. Thanks for exploring, and feel free to shape the future roadmap with issues or discussions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bestllm-0.0.1.tar.gz.
File metadata
- Download URL: bestllm-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ebf435622a645ce1c21e82b1bbb5c37120585b26c8069bc3428c4f1e4e199e
|
|
| MD5 |
7ea14918fffc04142eb2f27dccb9639d
|
|
| BLAKE2b-256 |
73540d6e70c23c8b5e08bf102c552378ba82cb4d509bd7f5b861f52d658a06af
|
File details
Details for the file bestllm-0.0.1-py3-none-any.whl.
File metadata
- Download URL: bestllm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88bdeb217d8f170336e945793973525819097f20bb736800a5e91658222af0bd
|
|
| MD5 |
3413fb379d94de0535733ff3d23fa84f
|
|
| BLAKE2b-256 |
333ad81983ccf2496581897460f51436a1cfe4414e5a181ad35d7ec734da7217
|