Switching two local GGUF models on a home server from Telegram
- 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
- Model arguments come from an environment file (gemma.env or inkling.env)
- A root-owned switch script restarts the server only when the requested model differs from the running one
- The assistant calls wake-llama or wake-inkling over a restricted SSH command channel
- A per-turn wake plugin picks the wake command from the model path in config.yaml
- 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
- Build llama.cpp with an explicit job count (for example -j 1) in the background
- Set CUDA_DEVICE_ORDER=PCI_BUS_ID everywhere so GPU numbers match nvidia-smi
- Run one llama-server on port 8080 reading model arguments from a per-model env file
- Write a switch script that restarts the server only when the model changes
- In Hermes config.yaml, set discover_models: false and list both models with context_length 65536
- 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_0Similar 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.
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.
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.
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.