Ollama Doctor
A lightweight command-line utility for checking local Ollama models — RAM fit, side-by-side comparisons, and real response-time benchmarks — before you build anything around them.
Overview
Ollama Doctor helps you understand your local Ollama environment by:
- Listing installed Ollama models with estimated RAM needs and download size
- Comparing multiple models' RAM requirements side by side
- Checking whether a specific model fits your available system memory
- Benchmarking a model's real response time and suggesting a timeout value
- Showing what's currently loaded in memory right now
The goal is to catch problems — like a model needing more RAM than you have — in seconds, instead of discovering it partway through building something around it.
Features
list — installed models
MODEL EST. RAM DOWNLOAD STATUS
--------------------------------------------------------
llama3.1:8b 6.0 GB 4.6 GB Fits
deepseek-r1:14b 10.5 GB 9.0 GB Fits
check — does one model fit?
$ ollama-doctor check llama3.1:8b
PASS - llama3.1:8b (4.6GB) fits in available RAM (23.4GB)
compare — multiple models side by side
$ ollama-doctor compare llama3.1:8b deepseek-r1:14b llama3.1:70b
PASS - llama3.1:8b (4.6GB) fits in available RAM (23.4GB)
PASS - deepseek-r1:14b (9.0GB) fits in available RAM (23.4GB)
FAIL - llama3.1:70b (42.0GB) needs 18.6GB more RAM than available (23.4GB)
bench — real response time
$ ollama-doctor bench llama3.1:8b
llama3.1:8b: 0.19s response time — suggested timeout: 0.57s
status — what's loaded right now
Shows currently loaded models (from Ollama's /api/ps) plus current available RAM.
RAM Estimation
For models without a known downloaded size (or for quick comparison), estimation uses a simple heuristic based on parameter count:
Estimated RAM = Model Parameters (B) × 0.75 GB
Examples:
8B model → ~6 GB RAM
14B model → ~10.5 GB RAM
70B model → ~52.5 GB RAM
This is a rough estimate tuned for typical 4-bit quantized Ollama models — actual usage varies by quantization level. For installed models, list also shows real download size, which is a more accurate fit signal than the estimate alone.
Project Structure
ollama-doctor/
│
├── ollama_doctor/
│ ├── cli.py # argparse entrypoint, wires up all subcommands
│ ├── ollama_api.py # local Ollama client — /api/tags, /api/ps, /api/generate
│ ├── system.py # available RAM check (psutil)
│ ├── catalog.py # ollamadb.dev client (planned — not yet wired in)
│ ├── estimate.py # parameter-size → RAM estimate heuristic
│ │
│ └── commands/
│ ├── check.py # ollama-doctor check <model>
│ ├── compare.py # ollama-doctor compare <model1> <model2> ...
│ ├── list.py # ollama-doctor list
│ ├── bench.py # ollama-doctor bench <model>
│ └── status.py # ollama-doctor status
│
├── README.md
└── pyproject.toml
Installation
git clone <repository-url>
cd ollama-doctor
pip install -e .
This registers the ollama-doctor command via the project's entry point — no need to invoke modules directly.
Usage
ollama-doctor list
ollama-doctor check llama3.1:8b
ollama-doctor compare llama3.1:8b deepseek-r1:14b llama3.1:70b
ollama-doctor bench llama3.1:8b
ollama-doctor status
Requirements
- Python 3.9+
- Ollama installed and running locally
requests,psutil
Current Limitations
Model name parsing (estimate.py) is currently optimized for simple parameter_size labels as returned by Ollama's API (e.g. "8.0B").
Not yet handling variation in quantization suffixes within model tags themselves, e.g.:
deepseek-r1:70b-q4_K_M
gemma3:27b-it
Future Improvements
Planned features:
list --fits/--role draft|review/--searchfilters- Colored terminal output
- More accurate RAM estimates based on quantization level
- GPU/VRAM detection
- Automatic Ollama health diagnostics
- Support for more complex model tag formats
License
MIT License
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 ollama_doctor-0.1.0.tar.gz.
File metadata
- Download URL: ollama_doctor-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf895d0da74d9cb2885202b71cd059dc61c165350591526774c9a814d6f8f2c
|
|
| MD5 |
ad307c615d329dbe39179e840154201f
|
|
| BLAKE2b-256 |
ad6888793592d82400a96707fbc1a2da10bd3d9054505c8055b52c07eb327850
|
File details
Details for the file ollama_doctor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ollama_doctor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372ec29150e96261d380c253d5b607e4a1f82c7657728b9c97011d822d5be6f4
|
|
| MD5 |
2187339ac8d06b25e5f6cce8faceafc1
|
|
| BLAKE2b-256 |
573884554c205b55950adb1cacfe9cf250ff7db35ef52b32475be64a340f98ea
|