mirror of
https://github.com/Heretek-AI/interface.git
synced 2026-11-09 18:51:24 -10:00
Versions and defaults refreshed against upstream: - LiteLLM v1.40.13-stable -> v1.100.0 (latest stable, 2026-09-06). Empirically verified the v1.100.0 base image ships redisvl 0.4.1 already, so the redisvl pin stays at 0.4.1 (no bump needed). - CachyLLama commit pinned to 609f40e (2026-09-08), which includes the ssd_cold_start_used KV-cache-corruption fix and tracks llama.cpp v0.4.0. CACHYLLAMA_COMMIT exposed as a compose build-arg default in .env. - Default LLM switched to Ornith-1.5-35B-A3B-CRACK-Q4_K_M.gguf (Qwen-3.5 hybrid GatedDeltaNet+attention MoE, 35B/3B active, fits 24GB GPU at Q4_K_M). Context dropped to 8192 to fit KV headroom; added --jinja and publisher sampling defaults (temp=1.0, top_p=0.95, top_k=20). Reasoning mode gated by LLM_CHAT_TEMPLATE_KWARGS (off by default). - Default embedder switched to Harrier Q5_K_M (424 MiB) per model card recommendation; embedding dim stays 1024 so the RediSearch index needs no migration. README updated with VRAM budget, sampling, and upgrade guidance. Co-Authored-By: Claude Code <[email protected]>
167 lines
4.2 KiB
YAML
167 lines
4.2 KiB
YAML
services:
|
|
# 1. LLM Generation Engine
|
|
cachyllama:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
CACHYLLAMA_COMMIT: ${CACHYLLAMA_COMMIT:-main}
|
|
container_name: cachyllama-engine
|
|
restart: unless-stopped
|
|
devices:
|
|
- /dev/dri:/dev/dri
|
|
group_add:
|
|
- video
|
|
- render
|
|
environment:
|
|
- GGML_VK_FA_KV_CONTIG=1
|
|
- GGML_VK_CONCAT_TRANSPOSE=1
|
|
volumes:
|
|
- ./data/models:/data/models:ro
|
|
- ./data/ssd_cache:/data/ssd_cache:rw
|
|
command:
|
|
- --model
|
|
- /data/models/${LLM_MODEL_FILE}
|
|
- --host
|
|
- 0.0.0.0
|
|
- --port
|
|
- "8080"
|
|
- -c
|
|
- ${LLM_CONTEXT_SIZE:-8192}
|
|
- -ngl
|
|
- ${LLM_GPU_LAYERS:-99}
|
|
- --jinja
|
|
- --temp
|
|
- "${LLM_TEMP:-1.0}"
|
|
- --top-p
|
|
- "${LLM_TOP_P:-0.95}"
|
|
- --top-k
|
|
- "${LLM_TOP_K:-20}"
|
|
- --cache-ssd
|
|
- /data/ssd_cache
|
|
- --cache-ssd-checkpoints
|
|
- ${LLM_CACHE_SSD_CHECKPOINTS:-64}
|
|
- --cache-ssd-hot-window
|
|
- ${LLM_CACHE_SSD_HOT_WINDOW:-16384}
|
|
- --cache-ssd-warm-window
|
|
- ${LLM_CACHE_SSD_WARM_WINDOW:-32768}
|
|
- --cache-ssd-system-prompts
|
|
- ${LLM_CACHE_SYSTEM_PROMPTS:-8}
|
|
- --cache-ssd-system-max-days
|
|
- ${LLM_CACHE_SYSTEM_MAX_DAYS:-30}
|
|
- --cache-ram
|
|
- ${LLM_CACHE_RAM:-8192}
|
|
ports:
|
|
- "${LLM_HOST_PORT:-8080}:8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- internal
|
|
|
|
# 2. Embedding Microservice
|
|
harrier-embedder:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
CACHYLLAMA_COMMIT: ${CACHYLLAMA_COMMIT:-main}
|
|
container_name: embedder-engine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/models:/data/models:ro
|
|
command:
|
|
- --model
|
|
- /data/models/${EMBED_MODEL_FILE}
|
|
- --host
|
|
- 0.0.0.0
|
|
- --port
|
|
- "8081"
|
|
- --embedding
|
|
- --pooling
|
|
- ${EMBED_POOLING:-last}
|
|
- -c
|
|
- ${EMBED_CONTEXT_SIZE:-4096}
|
|
- -ngl
|
|
- "0"
|
|
- -ub
|
|
- "2048"
|
|
ports:
|
|
- "${EMBED_HOST_PORT:-8081}:8081"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8081/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- internal
|
|
|
|
# 3. Redis Vector Store (RediSearch + RedisJSON for semantic caching)
|
|
redis-stack:
|
|
image: redis/redis-stack-server:7.4.0-v3
|
|
container_name: redis-vector-store
|
|
restart: unless-stopped
|
|
environment:
|
|
# requirepass gates access to the cache (semantic-cache prompts are
|
|
# privacy-sensitive). REDIS_PASSWORD is sourced from .env.
|
|
- REDIS_ARGS=--save 60 1 --appendonly yes --requirepass ${REDIS_PASSWORD}
|
|
volumes:
|
|
- ./data/redis:/data
|
|
# NOTE: Redis is intentionally NOT published to the host. The LiteLLM
|
|
# gateway reaches it over the `internal` docker network. To debug
|
|
# locally, run `docker exec -it redis-vector-store redis-cli -a $REDIS_PASSWORD`.
|
|
expose:
|
|
- "6379"
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "redis-cli -a \"$$REDIS_PASSWORD\" ping | grep -q PONG"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- internal
|
|
|
|
# 4. LiteLLM Proxy Gateway
|
|
litellm:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.litellm
|
|
container_name: litellm-proxy
|
|
restart: unless-stopped
|
|
depends_on:
|
|
cachyllama:
|
|
condition: service_healthy
|
|
harrier-embedder:
|
|
condition: service_healthy
|
|
redis-stack:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./litellm-config.yaml:/app/config.yaml:ro
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- REDIS_HOST=redis-stack
|
|
- REDIS_PORT=6379
|
|
command: ["--config", "/app/config.yaml", "--port", "4000"]
|
|
ports:
|
|
- "4000:4000"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:4000/health/liveliness"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
networks:
|
|
- internal
|
|
- edge
|
|
|
|
networks:
|
|
internal:
|
|
driver: bridge
|
|
edge:
|
|
driver: bridge
|