# yaml-language-server: $schema=https://raw.githubusercontent.com/mostlygeek/llama-swap/refs/heads/main/config-schema.json healthCheckTimeout: 600 logToStdout: "both" # proxy and upstream macros: base_args: "--no-warmup --port ${PORT}" common_args: "--fit-target 1536 --no-warmup --port ${PORT}" ctx_64k: "--ctx-size 65536" ctx_128k: "--ctx-size 131072" ctx_256k: "--ctx-size 262144" qwen35_think_args: "--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.00 -ctk q4_0 -ctv q4_0 --presence_penalty 1.5 --reasoning on" qwen35_nothink_args: "--temp 0.7 --top-p 0.80 --top-k 20 --min-p 0.00 -ctk q4_0 -ctv q4_0 --presence_penalty 1.5 --reasoning off" qwen35_35b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_mmproj-F16.gguf" qwen35_4b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-4B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-4B-GGUF_mmproj-F16.gguf" gemma4_sampling: "--temp 1.0 --top-p 0.95 --top-k 64 -ctk q4_0 -ctv q4_0" hooks: on_startup: preload: - "Qwen3.5-0.8B-GGUF-nothink:Q4_K_XL" # matrix replaces groups (they are mutually exclusive). # The small 0.8B model runs alongside any LLM. # FLUX runs alone — it needs all available VRAM and will evict the 0.8B first. matrix: vars: q8: "Qwen3.5-0.8B-GGUF-nothink:Q4_K_XL" flux: "flux1-dev:Q4_K_S" evict_costs: flux: 10 # large files, slow to reload sets: # any LLM can run alongside the small always-on model with_q8: "(Qwen3-Coder-Next-GGUF:Q4_K_M | Qwen3.5-35B-A3B-GGUF:Q4_K_M | Qwen3.5-35B-A3B-GGUF-nothink:Q4_K_M | Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M | Qwen3.5-35B-A3B-heretic-GGUF-nothink:Q4_K_M | Qwen3.5-4B-GGUF:Q4_K_M | Qwen3.5-4B-GGUF-nothink:Q4_K_M | Qwen3.5-4B-heretic-GGUF:Q4_K_M | Qwen3.5-4B-heretic-GGUF-nothink:Q4_K_M | gemma-4-26B-A4B-it:UD-Q4_K_XL | gemma-4-26B-A4B-it:UD-Q2_K_XL | unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL | unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XL | unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL | unsloth/Qwen3.6-35B-A3B-GGUF-nothink:UD-Q4_K_XL | HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive:Q4_K_M | HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-nothink:Q4_K_M | unsloth/Qwen3.6-35B-A3B-MTP-GGUF:Q4_K_M | unsloth/Qwen3.6-35B-A3B-MTP-GGUF-nothink:Q4_K_M) & q8" # FLUX runs alone — evicts everything including q8 image_gen: "flux" models: "Qwen3-Coder-Next-GGUF:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3-Coder-Next-GGUF:Q4_K_M --ctx-size 65536 --predict 8192 --temp 1.0 --min-p 0.01 --top-p 0.95 --top-k 40 --repeat-penalty 1.0 -ctk q4_0 -ctv q4_0 ${common_args} "Qwen3.5-35B-A3B-GGUF:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M ${ctx_256k} ${qwen35_think_args} ${common_args} "Qwen3.5-35B-A3B-GGUF-nothink:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M ${ctx_256k} ${qwen35_nothink_args} ${common_args} # The "heretic" version does not provide the mmproj # so providing url to the one from the non-heretic version. "Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M": cmd: | llama-server -hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M ${qwen35_35b_heretic_mmproj} ${ctx_256k} ${qwen35_think_args} ${common_args} "Qwen3.5-35B-A3B-heretic-GGUF-nothink:Q4_K_M": cmd: | llama-server -hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M ${qwen35_35b_heretic_mmproj} ${ctx_256k} ${qwen35_nothink_args} ${common_args} "Qwen3.5-0.8B-GGUF-nothink:Q4_K_XL": cmd: | llama-server -hf unsloth/Qwen3.5-0.8B-GGUF:Q4_K_XL --ctx-size 4096 ${qwen35_nothink_args} ${base_args} "Qwen3.5-4B-GGUF:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M ${ctx_128k} ${qwen35_think_args} ${common_args} "Qwen3.5-4B-GGUF-nothink:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M ${ctx_128k} ${qwen35_nothink_args} ${common_args} "Qwen3.5-4B-heretic-GGUF:Q4_K_M": cmd: | llama-server -hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M ${qwen35_4b_heretic_mmproj} ${ctx_128k} ${qwen35_think_args} ${common_args} "Qwen3.5-4B-heretic-GGUF-nothink:Q4_K_M": cmd: | llama-server -hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M ${qwen35_4b_heretic_mmproj} ${ctx_128k} ${qwen35_nothink_args} ${common_args} "gemma-4-26B-A4B-it:UD-Q4_K_XL": cmd: | llama-server -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL \ ${ctx_256k} ${gemma4_sampling} ${common_args} "gemma-4-26B-A4B-it:UD-Q2_K_XL": cmd: | llama-server -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q2_K_XL \ ${ctx_256k} ${gemma4_sampling} ${common_args} "unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL": cmd: | llama-server -hf unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL \ ${ctx_128k} ${gemma4_sampling} ${common_args} "unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XL": cmd: | llama-server -hf unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XL \ ${ctx_128k} ${gemma4_sampling} ${common_args} "unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL": cmd: | llama-server -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL ${ctx_256k} ${qwen35_think_args} ${common_args} "unsloth/Qwen3.6-35B-A3B-GGUF-nothink:UD-Q4_K_XL": cmd: | llama-server -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL ${ctx_256k} ${qwen35_nothink_args} ${common_args} "HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive:Q4_K_M": cmd: | llama-server -hf HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive:Q4_K_M ${ctx_256k} ${qwen35_think_args} ${common_args} "HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-nothink:Q4_K_M": cmd: | llama-server -hf HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive:Q4_K_M ${ctx_256k} ${qwen35_nothink_args} ${common_args} "unsloth/Qwen3.6-35B-A3B-MTP-GGUF:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.6-35B-A3B-MTP-GGUF:Q4_K_M ${ctx_256k} ${qwen35_think_args} --spec-type draft-mtp --spec-draft-n-max 1 --parallel 1 ${common_args} "unsloth/Qwen3.6-35B-A3B-MTP-GGUF-nothink:Q4_K_M": cmd: | llama-server -hf unsloth/Qwen3.6-35B-A3B-MTP-GGUF:Q4_K_M ${ctx_256k} ${qwen35_nothink_args} --spec-type draft-mtp --spec-draft-n-max 1 --parallel 1 ${common_args} # Image generation via stable-diffusion.cpp (sd-server) # Models must be pre-downloaded to /root/.cache/sd/ # FLUX.1-dev: state-of-the-art open-weight text-to-image model by Black Forest Labs # Download: huggingface-cli download lllyasviel/FLUX.1-dev-gguf flux1-dev-Q4_K_S.gguf --local-dir /root/.cache/sd # Download VAE: huggingface-cli download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir /root/.cache/sd # Download text encoders: huggingface-cli download comfyanonymous/flux_text_encoders clip_l.safetensors t5xxl_fp16.safetensors --local-dir /root/.cache/sd "flux1-dev:Q4_K_S": checkEndpoint: "/" cmd: | sd-server --listen-port ${PORT} --diffusion-model /root/.cache/sd/flux1-dev-Q4_K_S.gguf --vae /root/.cache/sd/ae.safetensors --clip_l /root/.cache/sd/clip_l.safetensors --t5xxl /root/.cache/sd/t5xxl_fp16.safetensors --cfg-scale 1.0 --sampling-method euler --steps 20