Skip to main content

Syntax

Description

Download a GGUF model from HuggingFace for use with llama.cpp. The command accepts multiple input formats:
  • HuggingFace repo (e.g., bartowski/Llama-3.1-8B-Instruct-GGUF)
  • Search query (e.g., llama 8b)
  • Known model name (e.g., llama-3.1-8b-instruct)
If no quantization is specified, llmfit automatically selects the best quantization that fits your available hardware.

Arguments

string
required
Model to download. Can be a HuggingFace repo, search query, or known model name.

Options

string
Specific GGUF quantization to download (e.g., Q4_K_M, Q8_0). If omitted, selects the best quantization that fits your hardware based on available VRAM/RAM.
float
Maximum memory budget in GB for quantization selection. Useful for constraining downloads to models that fit within a specific memory limit.
boolean
default:"false"
List available GGUF files in the repository without downloading. Useful for exploring quantization options before committing to a download.
string
Override GPU VRAM size (e.g., 32G, 32000M, 1.5T). Global flag for hardware detection override.
integer
Cap context length used for memory estimation (tokens). Global flag.

Usage Examples

Download with automatic quantization selection

Searches for “llama 8b”, finds matching GGUF repos, and downloads the best quantization that fits your hardware.

Download specific quantization

Downloads the Q4_K_M quantization of the specified model.

List available quantizations

Shows all available GGUF files in the repository without downloading.

Download with memory budget

Downloads the highest quality quantization that fits within 16GB of memory.

Download with VRAM override

Overrides GPU VRAM to 24GB for quantization selection, then downloads the best fit.

Example Output

Notes

  • Downloads are cached in ~/.cache/llama.cpp/ to avoid re-downloading
  • If llama-cli or llama-server is not installed, llmfit will still download the model but won’t be able to run it via the run command
  • The --list flag is useful for exploring available quantizations before committing to a large download
  • Quantization selection considers both VRAM (for GPU inference) and RAM (for CPU fallback)