Skip to main content

BestLLM logo

bestllm

Picks the most capable local LLM your machine can comfortably run, with zero guesswork.

Python Versions Status Linted with Ruff

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.HardwareSpecs captures total RAM, CPU cores, and GPU VRAM.
  • bestllm.models defines the catalog of ModelProfile objects (size, context window, and resource requirements).
  • bestllm.selector.recommend_model_for_specs scores 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

  1. Open src/bestllm/models.py and add a ModelProfile to DEFAULT_MODEL_PROFILES.
  2. Document resource requirements and noteworthy constraints in the notes field.
  3. Re-run bestllm to confirm the new profile appears when the hardware qualifies.
  4. Add targeted tests under tests/models/ (mirroring the src/bestllm layout) to lock down the new behavior.

Configuration Tips

  • Pair bestllm with your runner scripts to auto-pick the right gguf file before launch.
  • Override hardware detection in constrained environments by instantiating HardwareSpecs manually and passing it to recommend_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 src and ty src pass before sending a PR.
  • Keep new features isolated in their own modules under src/bestllm/ and surface them through bestllm.__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.

Metadata

Release files for bestllm 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bestllm 0.0.1
File Size Uploaded Provenance
bestllm-0.0.1.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bestllm 0.0.1
File Interpreter ABI Platform
bestllm-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / bestllm-0.0.1.tar.gz

Download URL bestllm-0.0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e4ebf435622a645ce1c21e82b1bbb5c37120585b26c8069bc3428c4f1e4e199e
BLAKE2b-256 checksum
How to use checksums
73540d6e70c23c8b5e08bf102c552378ba82cb4d509bd7f5b861f52d658a06af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.15

Release files / bestllm-0.0.1-py3-none-any.whl

Download URL bestllm-0.0.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88bdeb217d8f170336e945793973525819097f20bb736800a5e91658222af0bd
BLAKE2b-256 checksum
How to use checksums
333ad81983ccf2496581897460f51436a1cfe4414e5a181ad35d7ec734da7217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.15

Security for bestllm 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page