llmfit-local
A zero-dependency CLI tool that inspects your local CPU, RAM, GPU/VRAM, and free disk space to recommend open-weight LLMs and quantization levels (FP16, Q8_0, Q5_K_M, Q4_K_M, and ONNX INT4) that fit your machine—complete with MoE-aware speed estimates (tok/s), binary .gguf header inspection, VRAM max-context scaling, Hugging Face repo inspection, local Ollama audits, and Modelfile generation.
Quick Demo
`\$ llmfit --use-case coding --max-context
System: Windows (AMD64) | 16 CPU cores
Memory: 32.0 GB RAM | Free Disk: 145.2 GB
GPU: NVIDIA GeForce RTX 4070 (12.0 GB VRAM)
--------------------------------------------------------------------------------------------
Model Quant Est. Mem Fit Speed Run Command
--------------------------------------------------------------------------------------------
Qwen 3 8B Q8_0 10.1 GB GPU_FULL 37-63 tok/s ollama run qwen3:8b [max 16k ctx]
Qwen 2.5 Coder 7B Q8_0 9.4 GB GPU_FULL 40-68 tok/s ollama run qwen2.5-coder:7b [max 32k ctx]
DeepSeek-R1 Distill 8B Q8_0 9.9 GB GPU_FULL 38-65 tok/s ollama run deepseek-r1:8b [max 16k ctx]
Qwen 3 4B Q8_0 5.3 GB GPU_FULL 76-130 tok/s ollama run qwen3:4b [max 128k ctx]
Phi-4 Mini 3.8B Q8_0 5.0 GB GPU_FULL 80-137 tok/s ollama run phi4-mini:3.8b [max 128k ctx]
Qwen 3 32B Q4_K_M 23.4 GB HYBRID 10-16 tok/s ollama run qwen3:32b
Qwen 2.5 Coder 32B Q4_K_M 23.4 GB HYBRID 10-16 tok/s ollama run qwen2.5-coder:32b
Qwen 3 30B-A3B (MoE) Q4_K_M 21.8 GB HYBRID 34-63 tok/s ollama run qwen3:30b-a3b
`\$ llmfit --gguf ./models/qwen3-8b-q4_k_m.gguf
Hardware: 32.0 GB RAM | GPU: NVIDIA GeForce RTX 4070 (12.0 GB VRAM)
GGUF Model: Qwen3-8B (qwen3 | Q4_K_M)
File Size: 4.92 GB | Native Context: 32,768 tokens
Target Context: 8,192 tokens | Est. Total Mem: 6.27 GB
Fit Tier: GPU_FULL | Est. Speed: 38-65 tok/s
Max GPU Ctx: 32,768 tokens
Features
- Automatic Hardware Detection: Probes system RAM, CPU cores, free disk space, NVIDIA GPUs (
nvidia-smi), AMD ROCm GPUs (rocm-smi), Windows discrete GPUs, and Apple Silicon unified memory using only the Python standard library. - Binary
.ggufHeader Inspection (--gguf): Reads GGUF v2/v3 metadata headers directly via Python's built-instructmodule to extract architecture, quantization type, native context length, and memory/speed fit without loading tensor weights. - VRAM Max-Context Scaling (
--max-context): Calculates the largest context window (2kup to128ktokens) that still fits 100% inside your GPU VRAM (GPU_FULL). - 26+ Curated Dense & MoE Models: Includes Qwen 3, Gemma 3, Phi-4, DeepSeek-R1 Distill, Devstral Small 24B, Mistral Small 3.2 24B, Llama 3.1/3.2/3.3, Qwen 3 30B-A3B (MoE), and Mixtral 8x7B (MoE).
- MoE-Aware Speed & Fit Tiers: Categorizes models into
GPU_FULL,HYBRID(GPU + RAM offload), orCPU_ONLYwhile scalingtok/sestimates from active parameters (active_params_b) for Mixture-of-Experts architectures. - Hugging Face Repo Lookup (
--hf): Fetches parameter metadata directly from Hugging Face (llmfit --hf Qwen/Qwen3-32B) and evaluatesFP16,Q8_0,Q5_K_M, andQ4_K_Magainst your hardware. - Custom Model Sizing (
--params,--active-params,--context): Evaluate any arbitrary dense or MoE model size and context length before downloading. - Local Ollama Audit (
--check-ollama) &ModelfileExport (--modelfile): Audits installedollama listmodels against detected VRAM/RAM or prints a ready-to-saveModelfileconfiguringPARAMETER num_ctx. - GGUF / Ollama & ONNX Modes: Outputs
ollama runcommands by default, orolive run --modelONNX INT4 recommendations with--onnx.
Cross-Platform Support
llmfit-local runs natively on Windows, macOS, and Linux with zero third-party dependencies:
- Windows: Uses
GlobalMemoryStatusExviactypesfor physical RAM detection, plusnvidia-smiand Windows video controller queries for GPU VRAM. - macOS: Detects Apple Silicon (
arm64) unified memory and budgets GPU allocation automatically. - Linux: Reads POSIX
sysconfmemory pages alongsidenvidia-smiandrocm-smiGPU telemetry.
Installation
# Run directly without installing
uvx llmfit-local
# Or install via pip
pip install llmfit-local
Usage
# Detect local hardware and recommend top models (with max GPU VRAM context annotations)
llmfit --max-context
# Inspect a local .gguf file header and evaluate hardware fit
llmfit --gguf path/to/model.gguf
# Filter for coding models that fit 100% in GPU VRAM
llmfit --use-case coding --fit gpu
# Inspect any Hugging Face model repo directly
llmfit --hf Qwen/Qwen3-32B
# Evaluate a custom MoE model (30.5B total, 3.3B active parameters) at 16k context
llmfit --params 30.5 --active-params 3.3 --context 16384
# Audit your locally installed Ollama models against detected VRAM/RAM
llmfit --check-ollama
# Generate an Ollama Modelfile with a 32k context window for your top fitting model
llmfit --modelfile --context 32768
# Recommend ONNX INT4 models instead of GGUF / Ollama
llmfit --onnx
# Simulate a 24 GB VRAM workstation
llmfit --ram 64 --vram 24
# Output structured JSON for scripts
llmfit --format json
Running Tests
pytest -v
License
MIT
Metadata
Release files for llmfit-local 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llmfit_local-0.2.0.tar.gz | 19.2 kB | With provenance | Details for llmfit_local-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llmfit_local-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for llmfit_local-0.2.0-py3-none-any.whl |
Total release size: 35.9 kB
Release files / llmfit_local-0.2.0.tar.gz
| Download URL | llmfit_local-0.2.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9d4f2320aeaeb2968eca649ccaf8067c360a9102ac8932b39181c173009a936
|
|
BLAKE2b-256 checksum How to use checksums |
3322dbc4927eb0971d064c21dcbb916a944bde7a2429fb35b2b074b71e6d553f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / llmfit_local-0.2.0-py3-none-any.whl
| Download URL | llmfit_local-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63fa4da3e55b35b6c1a30a5f5d3af7d3564daaf191d8940b7e09de10547dcba8
|
|
BLAKE2b-256 checksum How to use checksums |
6526e91a177ca1980df43d15e4a107749d106a03b43dd0f750395ee1628afe50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for llmfit-local 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for llmfit_local-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA 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.