Home / use case

Switching two local GGUF models on a home server from Telegram

At a glance
Hardware
Home server with an RTX 3060 (12 GB) and an RTX 3070 (8 GB)
Models & engines
llama.cpp build 12652, one llama-server unit on port 8080
Models: a Gemma 12B QAT Q4_K_M GGUF and Inkling-2-Mini Uncensored IQ2_M (about 8.7 GB)
Key gotcha
Running cmake --build with a bare -j means unlimited parallel jobs; CUDA compilation ran out of memory until -j 1 was used

What they built

metis atelier runs a personal AI assistant (Hermes Agent) on a VPS, with the local models on a home server that has an RTX 3060 (12 GB) and an RTX 3070 (8 GB). The 3060 normally serves a local Gemma model through llama.cpp; when the home server is off or unreachable, the assistant falls back to OpenRouter.

The post covers adding a second local model, Inkling-2-Mini Uncensored at IQ2_M (about 8.7 GB), served from the same llama.cpp server on port 8080, and making it possible to pick Gemma or Inkling from Telegram's /model menu while keeping a 64k context and letting the LLM take priority over idle-time mining.

Setup

  • Home server with an RTX 3060 (12 GB) and an RTX 3070 (8 GB)
  • llama.cpp build 12652, one llama-server unit on port 8080
  • Models: a Gemma 12B QAT Q4_K_M GGUF and Inkling-2-Mini Uncensored IQ2_M (about 8.7 GB)
  • Hermes Agent on a VPS reaching the home server over a Tailscale IP, with OpenRouter as fallback

How it works

  1. Model arguments come from an environment file (gemma.env or inkling.env)
  2. A root-owned switch script restarts the server only when the requested model differs from the running one
  3. The assistant calls wake-llama or wake-inkling over a restricted SSH command channel
  4. A per-turn wake plugin picks the wake command from the model path in config.yaml
  5. An idle monitor switches the 3060 to mining after 10 minutes without GPU load

Results & numbers

  • Inkling ran at about 11.3 GB with a 64k context after shrinking batch sizes and quantizing the KV cache
  • Only about 1 GB stayed free, so long conversations are the next thing to watch

Gotchas

  • Running cmake --build with a bare -j means unlimited parallel jobs; CUDA compilation ran out of memory until -j 1 was used
  • cudaMalloc failed with free VRAM because the interactive shell lacked CUDA_DEVICE_ORDER=PCI_BUS_ID, so CUDA_VISIBLE_DEVICES=0 pointed at the 3070
  • The Telegram model list showed only the running model until discover_models: false and an explicit models: dictionary were set
  • Hermes needs at least 64,000 tokens of context for summarization, which Inkling at 8k could not handle
“When CUDA reports out of memory on a device that has free memory, first check which physical GPU the process actually uses.”— metis atelier

Do it yourself

  1. Build llama.cpp with an explicit job count (for example -j 1) in the background
  2. Set CUDA_DEVICE_ORDER=PCI_BUS_ID everywhere so GPU numbers match nvidia-smi
  3. Run one llama-server on port 8080 reading model arguments from a per-model env file
  4. Write a switch script that restarts the server only when the model changes
  5. In Hermes config.yaml, set discover_models: false and list both models with context_length 65536
  6. For 64k context on 12 GB, use -b 128 -ub 128 and --cache-type-k q8_0 --cache-type-v q8_0
-b 128 -ub 128 --cache-type-k q8_0 --cache-type-v q8_0
Source: DEV Community (metis atelier) · Published 2026-11-24 · Added 2026-11-24. This write-up summarizes the original source; see it for full details.

Similar setups

A homelab llama-server on Fedora that runs as a systemd service and swaps models on demand

A homelabber's notes on keeping llama.cpp's server running on a Fedora VM with a systemd user unit, a fixed LAN address and a models folder, with Open WebUI as the chat front end.

mr-tinkerer (homelab notes) · 2026-11-04

Fine-tuning Gemma 4 E2B on an 8 GB RTX 3050 so it thinks less

xbill used one 8 GB RTX 3050 to have Gemma 4 E2B write its own training data, fine-tune itself through its served 4-bit weights and get graded on 250 held-out maths problems, the whole loop in 6 h 44 min.

xbill (DEV Community) · 2026-10-22

Running a 14.4 GB Gemma 4 26B MoE on an 8 GB RTX 3050 with llama.cpp

A step-by-step llama.cpp setup that serves Gemma 4 26B A4B from an 8 GB RTX 3050 by keeping most expert layers in system RAM, reaching 131,072 tokens of context and scores level with the 12B that fits the card.

xbill (DEV Community) · 2026-10-21

Booting a local Qwen3.6 35B chat server straight from UEFI on an RTX 3090

Alexey Fateev wrote a 528 KB pure-assembly UEFI file that boots an RTX 3090 with no operating system, loads a 20.5 GB GGUF model and serves an OpenAI-style API and web chat on his LAN.

X (@superalesha) · 2026-12-03