Architecture Decision Records — AI VM Management
ADRs here capture decisions for the AI VM homelab project.
| # | Title | Status |
|---|---|---|
| 0001 | LlamaFarm as AI model management layer | Proposed |
ADRs here capture decisions for the AI VM homelab project.
| # | Title | Status |
|---|---|---|
| 0001 | LlamaFarm as AI model management layer | Proposed |
Status: Proposed
Date: 2026-07-14
The homelab has a dedicated AI VM running Ubuntu with assorted AI tools installed ad-hoc. There is no consistent model management layer — models are pulled manually, runtimes are configured individually (Ollama, vLLM, raw HuggingFace), and there is no unified API surface or RAG pipeline.
As part of a broader effort to make this VM “more than just a box with AI tools on it,” a management layer is needed for:
Provision the VM, install Ollama/vLLM directly, manage models via shell scripts or ad-hoc commands.
Provision the VM with Ansible, then run LlamaFarm natively (no containers) to manage models, RAG, and API serving.
llamafarm.yaml), unified API, multi-model switching, built-in RAG, MCP support, no-container-required.Run a lightweight K8s cluster on the VM, deploy models via KServe or similar.
Orchestrate individual OSS components via Compose.
Adopt LlamaFarm as the AI model management layer, running natively (no containers) on a Debian VM with Ansible for infrastructure provisioning.
Ansible handles:
lf) via curl | bash$LF_DATA_DIR and $TRANSFORMERS_CACHE redirection to persistent volumesLlamaFarm handles:
llamafarm.yaml) is the source of truth for all AI behavior — model selection, prompts, RAG, MCP servers.lf init + lf start + pointing at cached models restores full capability.| Risk | Impact |
|---|---|
| Pre-1.0 stability | API/config changes between releases; may need to pin versions. |
| Small community | 833 GitHub stars, pre-1.0. Less troubleshooting help available compared to Ollama or Ansible. |
| PyApp binary size | Service binaries bundle Python runtimes (~1-2 GB total for server + rag + runtime). |
| YC-backed startup | Open-source today, but direction could shift. Fork as mitigation. |
| Dependency chain | Python + TypeScript + Go + Nx monorepo. More moving parts than Ollama alone. |
| CUDA compatibility | Requires matching CUDA toolkit version with PyTorch / llama.cpp. Upstream already dropped CUDA 11 (b7694+). |
| Mitigation | Detail |
|---|---|
| Pin LlamaFarm version | Use lf bundle --version v0.0.x to create offline install bundles; avoid latest drift. |
| Persistent model cache | $TRANSFORMERS_CACHE and $LF_DATA_DIR on NAS-backed NFS or dedicated disk — models survive VM recreation. |
| Ansible as day-0 only | Ansible provisions the VM and installs lf; LlamaFarm’s yaml is the AI config. Clear boundary reduces coupling. |
| Monitor upstream | Keep an eye on breaking changes before applying lf upgrades. Test in a disposable LXC first if uncertain. |
| NVIDIA driver pinning | Pin CUDA toolkit version in Ansible to match LlamaFarm’s PyTorch requirement. |
docs/homelab/ai-vm/architecture.md