This chapter inventories the local hardware, llama.cpp runtime, and GGUF files before any modeling work. The point is to make fit decisions from observed files and machine limits rather than from model names alone.
def run_command(command: list[str], timeout: int=15) ->str: result = subprocess.run(command, capture_output=True, text=True, timeout=timeout) text = (result.stdout or result.stderr).strip()if result.returncode !=0:returnf"command failed with code {result.returncode}: {text}"return textprint("GPU")print(run_command(["nvidia-smi","--query-gpu=name,memory.total,driver_version","--format=csv,noheader,nounits",]))print("\nSystem memory")print(run_command(["free", "-h"]))print("\nllama-server build")print(run_command([str(LLAMA_SERVER), "--version"]))
GPU
NVIDIA GeForce RTX 5070, 12227, 580.173.02
System memory
total used free shared buff/cache available
Mem: 31Gi 14Gi 355Mi 2.4Gi 19Gi 16Gi
Swap: 511Mi 511Mi 172Ki
llama-server build
version: 1458 (720d7fa40)
built with GNU 13.3.0 for Linux x86_64
def system_memory_gib() ->float: meminfo = Path("/proc/meminfo").read_text().splitlines() total_kib =next(int(line.split()[1]) for line in meminfo if line.startswith("MemTotal:"))return total_kib /1024**2def gpu_memory_gib() ->float|None: output = run_command(["nvidia-smi","--query-gpu=memory.total","--format=csv,noheader,nounits", ])try:returnfloat(output.splitlines()[0].strip()) /1024exceptException:returnNonesystem_ram_gib = system_memory_gib()gpu_vram_gib = gpu_memory_gib()usable_vram_gib = (gpu_vram_gib or0.0) -1.5def fit_assessment(size: float, label: str) ->str:if label =="adapter/control-vector":return"sidecar artifact, not a standalone model"if gpu_vram_gib and size <= usable_vram_gib -1.0:return"full GPU offload is plausible"if size <= system_ram_gib *0.75:return"CPU/GPU split or memory-mapped CPU inference is plausible"return"too large for this machine without a different quantization"fit_table = model_inventory.copy()fit_table["fit_assessment"] = [fit_assessment(row.size_gib, row.quant_or_format) for row in fit_table.itertuples()]print(f"Observed system RAM: {system_ram_gib:.1f} GiB")print(f"Observed GPU VRAM: {gpu_vram_gib:.1f} GiB")print(f"Planning VRAM after overhead: {usable_vram_gib:.1f} GiB")fit_table[["file", "quant_or_format", "size_gib", "fit_assessment"]]
Observed system RAM: 31.1 GiB
Observed GPU VRAM: 11.9 GiB
Planning VRAM after overhead: 10.4 GiB
file
quant_or_format
size_gib
fit_assessment
0
gpt-oss-20b-mxfp4.gguf
MXFP4
11.28
CPU/GPU split or memory-mapped CPU inference is plausible
The practical conclusion for this workstation is that Qwen 3.5 4B Q4 is the default fast test model, Talkie 13B Q4 is plausible for inference with careful context settings, and full fine-tuning of these generation models is not the consumer-hardware target. Adapter tuning and local serving are the right next steps.