Open SourceApache-2.0 License

badgr-gpu-doctor

Check whether your GPU can run a model — VRAM fit, CUDA version, quantization options — before you waste time loading it.

How it works

badgr-gpu-doctor infers a model's parameter count from its name, estimates VRAM per quantization level, and compares it against your GPU's known or detected VRAM — all before you spend a minute loading the model.

1

Detect or specify the GPU

Auto-detects your GPU and VRAM via nvidia-smi, or accepts --gpu / --vram-gb / --cuda-version overrides for CI or remote checks.

2

Estimate model VRAM

Calculates a min–max VRAM range for the model at the chosen quantization (fp16, int8, auto, int4), including KV cache and runtime overhead.

3

Report fit and next steps

Prints a compatible/incompatible verdict with suggestions (e.g. lower quantization, cap max_model_len), or the AI Badgr cloud command via --run-with-badgr.

1

Install

Terminal
npx badgr-gpu-doctor --model meta-llama/Llama-3.1-8B-Instruct

Requires Node.js 18+. nvidia-smi in PATH is optional, only needed for auto-detection.

2

Usage

Point it at a HuggingFace model ID. It auto-detects your GPU, or you can specify one manually — useful in CI where nvidia-smi isn't available.

Terminal
npx badgr-gpu-doctor --model Qwen/Qwen3-32B --gpu RTX4090
npx badgr-gpu-doctor --model Qwen/Qwen3-32B --gpu A100 --json

Example output

Terminal output
badgr-gpu-doctor — model: Qwen/Qwen3-32B  gpu: RTX4090

  ✓  Estimated VRAM needed: 19–26 GB (int4 quantization)
  ✗  Available VRAM:        24 GB (RTX 4090) — borderline, may OOM at runtime

  Suggestion: cap max_model_len to reduce KV cache memory, or use a larger GPU.
  To run this model in the cloud:
    npx badgr-gpu-doctor --model Qwen/Qwen3-32B --run-with-badgr

What's included

VRAM fit check for any HuggingFace model ID
Auto-detects your local GPU via nvidia-smi
Works offline with --gpu / --vram-gb overrides
Quantization-aware estimates (fp16, int8, auto, int4)
CUDA version compatibility check
Machine-readable --json output for CI
One-command handoff to cloud GPUs when it won't fit locally
View on GitHub →

Ready to try badgr-gpu-doctor?

npx badgr-gpu-doctor --model meta-llama/Llama-3.1-8B-Instruct — no account needed to get started.