Skip to content

zareefahmed/ailane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Lane

Inspect your hardware and find out which local AI models it can run.

ailane is a zero-config CLI that answers the questions you have before running AI models locally:

  • What CPU, RAM, and GPU does this machine have?
  • Can it run llama3.1:8b? At which quantization?
  • Which local models should I run on it?
  • Is my AI tooling (Ollama, CUDA, PyTorch, ...) set up correctly?

Works on Windows, Linux (including WSL, with GPU-passthrough detection), and macOS (including Apple Silicon unified memory).

Usage

No install needed:

npx ailane systeminfo

Or install globally:

npm install -g ailane

Commands

ailane systeminfo

CPU, memory, GPU, OS, and disk overview.

CPU
  Model              Intel Core Ultra 9 185H
  Cores              10 physical / 20 logical
  Architecture       x64

Memory
  Total              23.5 GiB
  Available          19.4 GiB
...

ailane gpu

Deep GPU detail: vendor, VRAM, driver version, CUDA/ROCm/Metal availability, WSL GPU passthrough, Apple Silicon unified memory. Uses nvidia-smi / rocm-smi / system_profiler when available for accurate numbers.

ailane recommend

Evaluates a catalog of popular open-weight models (Llama 3.x, Qwen 2.5/3, Mistral, Mixtral, Phi, Gemma, DeepSeek-R1 distills) against your hardware and tiers them:

Best picks
  ★ Qwen 2.5 32b          q4_k_m, 19.8 GiB
  ...
Runs on GPU (14)
Runs on CPU — slow (12)
Won't fit (6)

For each model it picks the highest-quality quantization that fits, preferring GPU > Apple unified memory > CPU.

ailane check <model>

Can this machine run a specific model?

ailane check llama3.1:8b          # default q4_k_m
ailane check qwen2.5:14b-q8_0     # explicit quantization
ailane check mistral              # single-size families need no tag
ailane check qwen3:30b-a3b        # MoE tags work too
ailane check gemma2:27b-f16       # full precision (fp16 also accepted)
ailane check mystery-13b          # unknown models estimated from parameter count
ailane check llama3.1:8b --context 32768   # budget KV cache for a longer context

Model ids follow family[:size][-quant]. Known quantizations, highest quality first: f16, q8_0, q6_k, q5_k_m, q4_k_m, q4_0, q3_k_m, q2_k. Omitting the size on a multi-size family lists the available tags; a typo'd family name gets did-you-mean suggestions.

llama3.1:8b (8.03B params, q4_k_m, 8192 ctx)
  Memory needed      6.3 GiB
  Budget             11.0 GiB — NVIDIA GeForce RTX 3060 (12 GiB VRAM)

  Fits — runs on GPU with 4.7 GiB headroom.

When a model doesn't fit at the requested quantization, check suggests the best one that does:

llama3.1:70b (70.6B params, q4_k_m, 8192 ctx)
  Memory needed      43.3 GiB
  Budget             18.8 GiB — system RAM (23 GiB)

  Does not fit — needs 43.3 GiB but only 18.8 GiB is available.

Exit codes are script-friendly: 0 fits, 2 does not fit, 1 error.

ailane doctor

Checks your local AI tooling: Ollama (installed and running?), Python, CUDA toolkit, PyTorch (with CUDA?), Docker, and llama.cpp — with install suggestions for anything missing.

Options

Every command supports:

  • --json — machine-readable output, nothing else on stdout
  • --context <tokens> (recommend, check) — context length to budget KV-cache memory for (default 8192)

Scripting examples

Gate a script or CI job on whether a model fits:

if ailane check llama3.1:8b; then
  ollama pull llama3.1:8b
fi

Pull answers out of the JSON output with jq:

# Just true/false
ailane check llama3.1:8b --json | jq .fits

# Where would it run, and with how much headroom?
ailane check qwen2.5:14b --json | jq '{mode: .result.mode, headroomGiB: .result.headroomGiB}'

# Every model that fits on the GPU, best quant first
ailane recommend --json | jq -r '.recommendations[] | select(.fit.mode == "gpu") | "\(.family):\(.tag) (\(.fit.quant))"'

# One-line machine summary
ailane recommend --json | jq -r .machine.summary

See how context length changes the memory math — KV cache grows with context, so a model that fits at 8k may not at 128k:

ailane check llama3.1:8b --context 8192
ailane check llama3.1:8b --context 131072

How the estimates work

Memory requirements are estimated from parameter count and quantization bits-per-weight (measured from llama.cpp GGUF files), plus a GQA-era KV-cache heuristic and runtime overhead:

required = params × bpw / 8  +  kv_cache(params, context)  +  overhead

Budgets are conservative: 92% of VRAM (driver reservation), 75% of Apple Silicon unified memory (Metal wired limit), 80% of system RAM (leave room for the OS). Real-world usage varies with runtime and settings — treat results as a good first approximation, not a guarantee.

Supported platforms

Windows, Linux (incl. WSL2), macOS. On any other OS the CLI prints an informative message and exits.

License

MIT © 2026 Zareef Ahmed

About the Developer

Built by Zareef Ahmed, a programmer and author passionate about making AI accessible on everyday hardware. Find more of his work at zareef.com.

About

Inspect your hardware and find out which local AI models it can run.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors