Check if an LLM fits on hardware
check_llm_fitCheck whether a specific local LLM fits in the memory of a specific GPU or Apple Silicon Mac. Returns fits/tight/won't-fit verdict with the memory breakdown (weights, KV cache, linear-attention state when present, runtime overhead, reserve), max context, and a concrete fix if it doesn't fit. Use this whenever a user asks anything like "can I run on my <GPU/Mac>?", "will fit in GB?", or "what do I need to run ?". Estimates using curated, config-derived architecture fields (MLA, sliding-window, hybrid attention, MoE modeled).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No | Alias of context_tokens — accepted because the REST API uses this name. Do not pass both with different values. | |
| gpu | No | GPU name, fuzzy — e.g. "RTX 4090", "RX 7900 XTX", "A100 80GB". Multi-GPU rigs: join with + — e.g. "RTX 5090 + RTX 3090" (VRAM pools across cards). Provide gpu OR mac_ram_gb. | |
| model | Yes | LLM name, fuzzy — e.g. "GLM-4.7-Flash", "gpt-oss-20b", "gemma 31b" | |
| quant | No | Weight quantization. GPU: Q4_K_M(default)/Q5_K_M/Q6_K/Q8_0/FP16. Mac: 4/8(default)/16 (bits). | |
| kv_bits | No | KV-cache quantization bits (default 16 = F16) | |
| gpu_count | No | Number of identical copies of the gpu (e.g. gpu="RTX 3090", gpu_count=2 for a 2×3090 rig). Default 1. | |
| mac_ram_gb | No | Apple Silicon unified memory in GB — e.g. 16, 64, 512. Provide gpu OR mac_ram_gb. | |
| context_tokens | No | Context length in tokens (default 8192). Alias: ctx (same field as the REST API). |