February 2026 · Home lab
Cognitive Silo: A Self-Hosted AI Stack on One GPU
A private AI stack for the AMD Radeon PRO W7900 in my workstation (48 GB, ROCm). One docker compose up starts local LLMs, speech-to-text and text-to-speech, image and video generation and per-project memory, all behind a single OpenAI-compatible gateway that falls back to GPT-4o when the GPU is busy.
At a glance
- GPU
- AMD Radeon PRO W7900, 48 GB, through ROCm; Ollama and ComfyUI run on it, the speech and music services on the CPU
- Gateway
- LiteLLM on port 4000: one OpenAI-compatible API with keys, routing, two retries and a GPT-4o fallback through GitHub Models
- Language
- DeepSeek-R1 32B and 70B, DeepSeek-V2 16B and Llama 3.3 on Ollama, plus nomic-embed-text for embeddings
- Speech
- Whisper Large v3 Turbo and Kokoro through Speaches, Fish Speech, and XTTS-v2 voice cloning
- Images, video, music
- FLUX.1-schnell and CogVideoX-2b in ComfyUI; MusicGen Small behind a small REST API
- Memory
- Mem0 on Qdrant, with each project in its own namespace
- Host
- 32 cores and 62 GB of RAM; reachable from my other machines over Tailscale
Architecture
Everything that speaks the OpenAI API goes through the gateway, so an editor plugin, a script or the chat UI uses the same endpoint and key, and never needs to know which model runs where.
:4000Keys, routing, retries, fallbacks; usage in PostgreSQL, caching in Redis:11434ROCm on the W7900: DeepSeek-R1 32B and 70B, DeepSeek-V2 16B, Llama 3.3, nomic-embed-text:8000Whisper Large v3 Turbo for speech-to-text, Kokoro 82M for text-to-speechAlongside the gateway
:8188FLUX.1-schnell images, CogVideoX-2b video:8080Project memory on Qdrant :6333:8001, XTTS-v2 :8002:8003 and playground :8004Fitting it in 48 GB
The language models and video generation share one card, so the memory is budgeted rather than left to chance. Ollama keeps at most two models loaded and never unloads them on a timer (OLLAMA_MAX_LOADED_MODELS=2, OLLAMA_KEEP_ALIVE=-1), and an init container warms the two everyday models at startup.
| Model | Use | VRAM |
|---|---|---|
| DeepSeek-R1 32B | Reasoning and code; kept loaded | ~20 GB |
| DeepSeek-V2 16B | Fast general use; kept loaded | ~10 GB |
| DeepSeek-R1 70B | Heavy reasoning; needs the card to itself | ~42 GB |
| Llama 3.3 | General use and scripting | ~42 GB |
| nomic-embed-text | 768-dimension embeddings for memory | ~0.3 GB |
Asking for a third model makes Ollama evict the least recently used one. If the GPU is saturated, the gateway sends the request to GPT-4o instead of making the caller wait.
Services
| Service | Port | Image | Role |
|---|---|---|---|
| Open WebUI | 3000 | open-webui | Chat UI with speech and image generation |
| LiteLLM | 4000 | berriai/litellm | The gateway |
| Ollama | 11434 | ollama:rocm | LLM inference on the GPU |
| Speaches | 8000 | speaches (CPU) | Whisper speech-to-text, Kokoro text-to-speech |
| Fish Speech | 8001 | fish-speech | Expressive text-to-speech |
| XTTS-v2 | 8002 | xtts-streaming-server (CPU) | Multilingual voice cloning |
| MusicGen API | 8003 | own build | Text to music |
| MusicGen UI | 8004 | own build | Gradio playground |
| ComfyUI | 8188 | own build | FLUX.1-schnell images, CogVideoX-2b video |
| Mem0 | 8080 | own build | Memory API: add, search, list |
| Qdrant | 6333 | qdrant | Vectors for Mem0 |
| Dashboard | 9000 | nginx | Service portal with health checks |
| PostgreSQL | – | postgres:16 | Gateway keys and usage |
| Redis | – | redis:7 | Caching and rate limits |
Making it repeatable
- One script from a fresh clone.
setup.shchecks the prerequisites, asks for the API keys and writes them to an untracked.env, skips models that are already downloaded, builds the containers, pulls the Ollama models and checks that everything answers. - Setup jobs, not manual steps. Three containers download model weights, pull the Ollama models and prepare Speaches on first start, then exit. Weights stay on disk, so later restarts are quick.
- Start order from health. 13 of the 17 containers have health checks, and services wait for what they depend on to be healthy. Most images ship without curl, so the checks use
bash /dev/tcpor Python'surllib. - Data where it belongs. Model weights live in a
./modelsfolder; PostgreSQL, Qdrant, Redis and the UIs keep their data in named volumes that survivedocker compose down. - Usable from anywhere. Other machines reach the gateway over Tailscale; the repository includes a Continue.dev configuration for VS Code and prompt templates for coding, debugging, hardware and UI work.


