Files
serverAppConfigs/scripts/frank-default-small.env
T
Frank 6efb0fb231 feat: replace llama.cpp Tiel-Coder with FreeToken v0.1.2 serving Qwen3.6-35B-A3B-FP8
Replace the llama.cpp Tiel-Coder-35B-A3B (UD-Q6_K_XL) deployment with
FreeToken v0.1.2 — an edge-native MoE serving engine that keeps expert
weights in host RAM with an LRU GPU cache and paged KV with radix prefix
sharing.

Model: Qwen/Qwen3.6-35B-A3B-FP8 (modelopt block-fp8, 128×128 weight_block_size).
Architecture: qwen3_5_moe — 40 layers (10 attention + 30 GDN), 256 experts/8 used.

Production config:
- 2048 MoE cache slots (20% of 10240 expert instances, ~6.0 GiB VRAM)
- 453005 KV tokens (~8.6 GiB, ~20 KiB/token for 10 attn layers)
- 4 max-running-requests (mamba slot pool: 24 slots)
- bs4 decode: ~87 tok/s aggregate, ~30 tok/s bs1
- Prefill: ~1,130 tok/s at 4k prompt

Quirk: FreeToken v0.1.2 supports modelopt block-fp8, NVFP4, and per-tensor
FP8, but NOT compressed-tensors per-channel FP8 (Huihui/Ornith both failed).
Live KV resize via ft ctl cache grows KV by shrinking MoE; reverse needs restart.

Old llama.cpp scripts archived to .AGENTTRASH/.
Full benchmark sweep (bs1/bs3/bs4/bs6, 8k–700k KV) documented in
docs/LLM/freetoken-benchmark-sweep.md.
2026-08-27 02:01:16 -07:00

51 lines
2.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tunables for frank-default-small (Qwen3.6-35B-A3B-FP8,
# qwen3_5_moe hybrid MoE, Dankserver, RTX 3090).
#
# Runtime: FreeToken v0.1.2 (edge-native MoE serving engine).
# Installed via uv into /home/dank/freetoken/.venv (CPython 3.12).
# FreeToken keeps expert weights in host RAM with an LRU GPU cache;
# KV is paged with radix prefix sharing. Only the 10 full-attention
# layers page KV (~20 KiB/token); the 30 GDN layers use constant-size
# per-sequence state (mamba slot pool).
#
# Model: Qwen/Qwen3.6-35B-A3B-FP8 (HuggingFace safetensors, modelopt
# block-fp8 quant, 128x128 weight_block_size, 35 GB on disk).
# Architecture: qwen3_5_moe — 40 layers (10 attention + 30 GDN),
# 256 experts / 8 used, 2 KV heads × 256 dim, full_attention_interval=4.
#
# Replaced the llama.cpp Tiel-Coder-35B-A3B (UD-Q6_K_XL) deployment on
# 2026-09-02. The old serve script and env are in .AGENTTRASH/.
#
# Pool sizing: GPU budget (~17.6 GiB after weights + fixed caches) is
# split MoE-first. MOE_CACHE_SIZE pins resident expert slots; NUM_TOKENS
# pins the KV pool. At 2048 slots / 453005 tokens the split is ~20%
# residency (2048/10240) and ~8.6 GiB KV. Live resize via
# `ft ctl cache --kv N --moe M` can grow KV by shrinking MoE without
# restart (the reverse requires a restart).
#
# WARNING: do not name any variable TEMP, HOST, or GPU_MAX_HEAP_SIZE.
# The ROCm HIP runtime reads those bare env vars (see the 2026-08-13 TEMP
# incident). This box is NVIDIA/CUDA, but the rule keeps the env portable.
# Model directory (safetensors checkpoint, 35 GB).
MODEL_DIR=/home/dank/models/qwen36-35b-a3b-fp8
# FreeToken venv (uv-managed CPython 3.12, ft CLI, flashinfer, torch+cu130).
FT_VENV=/home/dank/freetoken/.venv
CUDA_HOME_DIR=/home/dank/freetoken/.venv/lib/python3.12/site-packages/nvidia/cu13
ALIAS=frank-default-small
BIND_ADDR=0.0.0.0
LISTEN_PORT=7770
# Expert residency: 2048 of 10240 total expert instances (20%).
# Each slot ~3 MiB → ~6.0 GiB VRAM for the MoE cache.
MOE_CACHE_SIZE=2048
# KV pool: 453005 tokens (~8.6 GiB at ~20 KiB/token).
# Covers 4 concurrent sessions at ~113k unique context each
# (more with radix prefix sharing for common prefixes).
NUM_TOKENS=453005
# Max concurrent decoding requests (also caps mamba slot allocation).
MAX_RUNNING_REQUESTS=4