Layered Architecture
Alia sits between the user, the GPU, and Qwen Code — detecting hardware, selecting a profile, starting llama-server on loopback, and launching the agent. Everything stays local.
Swipe sideways to see the whole diagram →
Request Flow
Watch a request travel from your prompt through Qwen Code into llama-server, across GPU and RAM, and back as streamed tokens. Alia starts these pieces once; it is not in the token path.
Swipe sideways to see the whole diagram →
Measured Benchmarks
Real numbers from profiles.json — speeds measured on RTX 3070 8 GB, Ryzen 7 5800X, 16 GB RAM with llama.cpp commit a0e6dc7 and each profile's launch flags. The 35B values at 60K come from an earlier run without --jinja; quality scores come from separate runs.
Qwen3.6 35B-A3B — Balanced
rtx8gb-16gb-qwen36-35b · IQ3_XXS · 14.07 GBQwen3.5 9B — Fast
rtx8gb-qwen35-9b-fast · Q4_K_M · 5.7 GBQwen3.6 35B-A3B — Q4_K_XL
rtx12-16gb-qwen36-35b-q4 · 20.8 GB · unmeasuredQwen3.6 35B-A3B — Q4_K_XL (24 GB)
rtx24gb-qwen36-35b-q4 · 20.8 GB · unmeasuredComponent Details
Each component in the Alia ecosystem — from launcher to inference, from security to data paths.
🔒 Security Model
- llama-server bound to 127.0.0.1:8090 only
- Fixed API key "local" — not exposed externally
- State dir mode 0700, files mode 0600
- --no-webui disables llama.cpp web UI
- No pkill — targets only recorded PID by start time
- Profile can't override host/port
🔧 Launcher Features
- Hardware detection via nvidia-smi + /proc/meminfo
- Multi-GPU: picks largest VRAM GPU
- CUDA_VISIBLE_DEVICES pinning
- Start lock via flock
- GPU lock coordination (shared lock files)
- Ollama model unload before launch
- Health check before reuse
📊 Profile Selection
- Automatic: matches VRAM/RAM, picks highest ranked measured
- Pinned: explicit profile via
alia use - Warns on unmeasured or out-of-range
- 4 profiles: 2 measured, 2 unmeasured
- Server args validated (no network override)
📁 Data Paths
~/.local/state/alia— PID, server state, logs~/.local/share/alia/models— downloaded GGUF~/.config/alia/config.json— profile, language~/.local/state/alia/qwen-home— isolated Qwen home
🦙 llama-server Configuration
- llama.cpp commit a0e6dc7 (2026-10-14)
- CUDA enabled (built from source)
- MTP drafting: --spec-type draft-mtp
- Flash attention: -fa on
- Jinja chat template: --jinja
- Build path: ~/src/llama.cpp/build/bin/llama-server
💻 Qwen Code Integration
- Version: @qwen-code/qwen-code@0.25.1
- OpenAI API compatible endpoint
- Terminal UI + Web Shell (port 4170)
- Isolated QWEN_HOME per Alia session
- Approval modes: ask / auto-edit / yolo
- Thinking toggle: --fast disables