gemma4-stack / .env.example
Neohosseinism's picture
Add gemma4-stack config, scripts, and docker-compose setup
89bf59d
Raw
History Blame Contribute Delete
1.72 kB
# =============================================================================
# Gemma 4 stack configuration. Copy a profile over this file, e.g.:
# cp profiles/dev-cpu.env .env
# then edit HF_TOKEN. Every value below has a sensible default in compose.
# =============================================================================
# --- Hugging Face (required: Gemma 4 is gated) -------------------------------
HF_TOKEN=
# --- Hardware / inference knobs (rendered into llama-swap config) ------------
NGL=0 # GPU layers to offload. 0 = pure CPU. 99 = all (GPU).
THREADS=4 # physical cores (this box = 4). Not hyperthreads.
CTX=8192 # context window per model
# --- Default model shown in Open WebUI (must match a llama-swap config key) --
DEFAULT_MODEL=gemma-e4b # gemma-e4b | gemma-12b | gemma-26b-a4b
# --- RAG models (Persian-tuned) ----------------------------------------------
TEI_EMBED_MODEL=BAAI/bge-m3 # Persian, FaMTEB top-2 (Hakim's HF repo is unpublished)
TEI_EMBED_POOLING=cls # bge-m3 uses cls pooling
TEI_RERANK_MODEL=BAAI/bge-reranker-v2-m3
TEI_DTYPE=float16 # float16 -> lighter Candle backend on CPU (saves RAM)
# --- Images (override for GPU via docker-compose.gpu.yml) --------------------
LLAMASWAP_IMAGE=ghcr.io/mostlygeek/llama-swap:cpu
TEI_IMAGE=ghcr.io/huggingface/text-embeddings-inference:cpu-1.9
# --- Host ports ---------------------------------------------------------------
WEBUI_PORT=3000
LLAMASWAP_PORT=8080
TEI_EMBED_PORT=8081
TEI_RERANK_PORT=8082
# --- Misc ---------------------------------------------------------------------
OPENAI_API_KEY=sk-local
TEI_API_KEY=x
WEBUI_NAME=Gemma 4 Local