Commit Graph
1322 Commits
Author SHA1 Message Date
Frank 447286c2a1 docs(AGENTS.md): add runtime & troubleshooting knowledge from the TEMP/HIP incident
Four sections: env var naming rule (HIP collision, TEMP/HOST/GPU_MAX_HEAP_SIZE),
crash-loop diagnostic procedure, operational quirks (sudo -S, pkill -x, slow
load, page-cache confound), and the Dankclaw memory model (96 GiB SVM budget).
2026-08-13 18:08:56 -07:00
Frank 0afdd9d7b5 docs: document TEMP env var / HIP runtime crash incident in troubleshooting 2026-08-13 18:04:24 -07:00
Frank 227ce01417 fix: rename sampling TEMP var to TEMPERATURE to avoid HIP runtime env collision
The ROCm HIP runtime (libamdhip64) reads the TEMP environment variable as
its JIT kernel-cache temp directory. Commit db3eb01 added TEMP=1.0 to the
env files as a sampling default; the serve scripts export it via set -a.
HIP then used the path "1.0" for its cache, failed, and segfaulted with a
NULL-refcount unref (offset 0x446153 in libamdhip64) during model tensor
upload (ggml_backend_cuda_buffer_set_tensor). This crashed frank-default-
large on every restart from Aug 13 16:22 onward; the earlier c984a3e
"fix" (KV/batch changes) was unrelated.

Rename the sampling variable TEMP -> TEMPERATURE in both env files and
serve scripts. llama-server still receives --temp from the renamed var, so
sampling defaults are unchanged. The HIP runtime no longer sees a bogus
TEMP value. Affects frank-default-large (dankclaw) and frank-default-small
(dankserver).
2026-08-13 17:54:29 -07:00
Frank 6663af1041 Revert "Remove KV cache quantization, increase batch/ubatch on frank-default-large"
The Aug 13 change crashed frank-default-large in a restart loop. The service
segfaulted ~15s into model load (SIGSEGV in hipMalloc during load). The
benchmark (frank-default-large-benchmark.md) already proved ubatch 2048 OOMs
(40.9GB prefill buffer) and batch 2048 / ubatch 512 is the fits-and-loads
config on the 96GiB UMA budget. Restore q8_0/q8_0 KV cache (FA pairing) and
batch 2048 / ubatch 512.

Also fix deployment.md: KV is q8_0 K / q8_0 V (not f16 V) since 334b6af.
2026-08-13 17:04:02 -07:00
Frank c984a3e4e6 Remove KV cache quantization, increase batch/ubatch on frank-default-large
- Remove CACHE_TYPE_K/CACHE_TYPE_V (fp16 default on GPU)
- Increase BATCH_SIZE from 2048 to 8192
- Increase UBATCH_SIZE from 512 to 2048
- Remove --cache-type-k and --cache-type-v from llama-server flags
2026-08-13 16:50:09 -07:00
Frank db3eb01495 Add recommended sampling defaults and reduce MoE GPU offload on dankserver
- frank-default-large: add TEMP=1.0, TOP_K=20, TOP_P=0.95, MIN_P=0.0
  (per HauhauCS Qwen3.6-27B model card, thinking-general mode)
- frank-default-small: add same sampling defaults
  (per HauhauCS Qwen3.6-35B-A3B model card)
- frank-default-small: reduce N_CPU_MOE from 33 to 34 (6 expert
  layers on GPU instead of 7) to prevent OOM during high-load sessions
- Both serve scripts pass --temp, --top-k, --top-p, --min-p to
  llama-server; clients can still override per-request via API
2026-08-13 16:18:47 -07:00
Frank 334b6af2ae fix(frank-default-large): enable flash attention by pairing V cache to q8_0
Root cause of ~1 t/s long-context decode: llama.cpp build has
GGML_CUDA_FA_ALL_QUANTS=OFF, and FA requires K type == V type.
Mixed cache q8_0/f16 silently disabled FA, collapsing decode at
200k ctx. Set V to q8_0 (halves V memory too) and retune
threads 12/1 for 16 Zen5 cores.
2026-08-12 02:09:05 -07:00
Frank f20d6ce288 docs: add Dankclaw improvements research (agentic tools, runtime tuning, server/OS) 2026-08-11 18:14:44 -07:00
Frank e92c72fd11 docs: frank-default-large llama.cpp draft-dflash deployment + benchmark results; retire Ling vLLM references 2026-08-11 17:24:59 -07:00
Frank 668083fe76 perf: frank-default-large ubatch 512 (compute graph scales with ubatch; 602100 ctx KV leaves ~16GB, ubatch 2048 OOM) 2026-08-11 17:19:57 -07:00
Frank 62cc2b850a perf: frank-default-large batch capped at 2048/2048 — 3x200700 ctx KV ~50GB leaves no room for batch 12288 (OOM) 2026-08-11 17:11:04 -07:00
Frank bf64c0d9c2 perf: frank-default-large batch 12288 / ubatch 4096 2026-08-11 16:36:39 -07:00
Frank f5a959bfa2 fix: disable --fit in frank-default-large serve (full offload fits; fit aborted on explicit n-gpu-layers) 2026-08-11 16:28:03 -07:00
Frank 25e90bbbf7 deploy: frank-default-large final config — ROCm + draft-dflash, 3x200700 ctx (bench-fastest) 2026-08-11 16:27:15 -07:00
Frank d0c80b5b1a bench: 4k pipeline harness w/ early crash check; parametrized spec-type 2026-08-11 16:14:44 -07:00
Frank df185c8d22 feat: full-pipeline 64k spec benchmark harness 2026-08-11 15:07:21 -07:00
Frank aa2f4bfe39 feat: frank-default-large → llama.cpp Qwen3.6-27B Q8_K_P + DFlash draft + ngram-mod (bench pending) 2026-08-11 13:47:37 -07:00
Frank a74c1c5bcb Lower dankserver compute threads 8→7 to leave CPU headroom 2026-08-11 13:36:36 -07:00
Frank df41aaafe7 Offload one more MoE expert to CPU on frank-default-small (32→33 of 40) 2026-08-11 13:13:17 -07:00
Frank 4c5a4a5f3b docs: frank-default-small — 4 parallel slots, batch 8192/2048, n-cpu-moe 32
Update Dankserver System Specs and deployment to reflect the 4-stream config:
- 4 parallel slots (800000 total ctx), batch 8192 / ubatch 2048
- n-cpu-moe 32 (8 expert layers back on GPU)
- ~870 MiB VRAM headroom under 4-stream load
- Knob documented: n-cpu-moe 36 gives ~1.7 GiB more headroom if needed
2026-08-11 03:13:36 -07:00
Frank 870376d75f feat: frank-default-small — 4 slots, batch 8192/2048, n-cpu-moe 32, ngram-mod
- PARALLEL=4 (800000 total ctx), batch=8192, ubatch=2048
- n-cpu-moe=32 (moved 8 expert layers back to GPU)
- ctx-checkpoints=4 for headroom during larger batch compute
- All other tunables unchanged (ngram-mod, no-mmap, no-kv-offload, q8_0/f16 KV)
2026-08-11 02:54:49 -07:00
Frank 0aabd57c69 docs: README — frank-default-small runtime → ngram-mod (DFlash retired) 2026-08-11 02:42:32 -07:00
Frank 677b4af2a4 docs: frank-default-small now uses ngram-mod, DFlash retired
- SWAT from DFlash (see ngram-mod benchmarks below); draft model
  not loaded. Active spec: --spec-type ngram-mod n_min=48/n_max=64/n_match=24.
- Update Dankserver specs, deployment.md, DFlash doc to ngram-mod.
- VRAM footprint: 14 GB (was 20 GB), ~10 GB free headroom.
2026-08-11 02:41:33 -07:00
Frank fd528ab364 chore: frank-default-small — ngram-mod, drop DFlash draft
- spec-type → ngram-mod (no separate draft model)
- drop --model-draft, --spec-draft-n-max; add --spec-ngram-mod-n-min/max/match
- DFlash batch default fallback SPEC_TYPE → ngram-mod
- env: SPEC_TYPE=ngram-mod, NGRAM_MOD_N_MIN=48, N_MAX=64, N_MATCH=24
- DRAFT_FILE env var emptied (not used under ngram-mod)
2026-08-11 02:29:32 -07:00
Frank 5c9e812221 docs: frank-default-small now 200000 ctx/stream, batch 3072/1536, --no-mmap
Sync deployment.md, Dankserver specs, DFlash doc to the tuned config:
ctx reduced to 200000 per stream (pool 600000) to free KV VRAM for the larger
batch; --no-mmap eager RAM load; ctx-checkpoints 4; ~20GB VRAM / 32GB RAM.
models.json contextWindow -> 200000.
2026-08-11 01:52:12 -07:00
Frank 9971f83e8b perf: frank-default-small ctx 200000/stream, --no-mmap, batch 3072/1536
Lower each stream to 200000 ctx (pool 600000) to free KV VRAM for the larger
batch. Add --no-mmap so the CPU-resident MoE experts load eagerly into RAM
(avoids decode page faults). Keep KV on GPU. Experts already fully on CPU.
2026-08-11 01:45:41 -07:00
Frank e45f457ad4 perf: frank-default-small batch 3072 / ubatch 1536 + ctx-checkpoints
Bigger logical/physical batches for prefill throughput. Enable
--ctx-checkpoints to park attention checkpoints in RAM, holding peak GPU
memory down so the larger ubatch fits the 24GB VRAM alongside 3x262144 KV
without OOM. Weight split unchanged (experts CPU, non-experts GPU).
2026-08-11 01:33:28 -07:00
Frank 35c44c4123 docs+deploy: Dankserver now llama.cpp frank-default-small (HauhauCS Q6_K_P + DFlash)
Retire vllm-awq-qwen36 (AWQ) from target maps, README, deployment, KB index,
Dankserver specs, DFlash and FP8 docs. New dankserver runtime: upstream
llama.cpp, port 7770, alias frank-default-small, 3x262144 ctx, DFlash Q8_0
draft, MoE experts offloaded to CPU, attention+KV on GPU (K q8_0, V f16).
deploy.sh now maps dankserver to frank-default-small and symlinks its unit.
models.json: dankserver baseUrl -> :7770, contextWindow -> 262144.
2026-08-11 01:18:29 -07:00
Frank 6a86a9df93 fix: frank-default-small ctx-size 786432 (3 slots x 262144 each)
llama.cpp splits --ctx-size across --parallel slots, so 262144 total gave
87552 per stream. Non-negotiable is 262144 per stream: total pool must be
786432.
2026-08-11 01:05:24 -07:00
Frank f93096f2bf feat: frank-default-small = HauhauCS Qwen3.6-35B-A3B uncensored Q6_K_P + DFlash on dankserver
llama.cpp service replacing retired vllm-awq-qwen36 on port 7770 with alias
frank-default-small. Wrapper sources frank-default-small.env for tunables:
3 parallel slots at 262144 ctx, draft-dflash n-max 7, KV K=q8_0 V=f16 on GPU,
all MoE experts on CPU (--n-cpu-moe 40), non-expert tensors on GPU, mmproj
vision + jinja. Unit: frank-default-small.service (ExecStart in dankserver
repo clone /home/dank/vLLM/scripts).
2026-08-11 00:57:04 -07:00
Frank 903d54c389 docs: reflect Ling-3 vLLM (frank-default-large) on Dankclaw
Update target maps (AGENTS, README, deployment, deploy.sh) from the retired
ROCmFPX llama.cpp stack to the active vLLM-ROCm CIRU INT4 service on port 7770
with MTP speculative decoding. Align Dankserver to the running
vllm-awq-qwen36 (AWQ, port 34401). Refresh KB pages: Dankclaw system specs
(gpu-mem-util 0.95, CIRU venv), quantization choices (INT4 primary, MXFP4
experiment), DFlash/DSpark Dankclaw section, and the KB index topology.
2026-08-10 23:37:27 -07:00
Frank 52ad985978 feat: raise Ling-3 GPU memory utilization to 0.95
The 0.72 default from native-256k.env OOMs. Export 0.95 in the wrapper;
native-256k uses ${GPU_MEMORY_UTILIZATION:-0.72} so this value wins.
2026-08-10 23:25:02 -07:00
Frank bf14ac7a7b fix: run Ling-3 vLLM from a cwd with no top-level vllm/ dir
The launcher does not change directory, so process cwd becomes sys.path[0]
for the 'python -m ...registry' model-inspection subprocess. From the CIRU
package root, the top-level vllm/ repo dir shadows the editable install as a
namespace package, breaking lazy imports (SamplingParams) and failing model
architecture inspection. cd to /home/dank/ling3-ciru before exec.
2026-08-10 23:16:46 -07:00
Frank 4a17948443 feat: add Ling-3.0-flash vLLM service for Dankclaw (frank-default-large, port 7770)
- serve-ling3-vllm.sh: wrapper around jcbtc validated run-256k.sh (TRITON_MLA,
  MTP K1, 256k, 6 slots, ROCr idle-fix LD_PRELOAD); sets HOST/PORT/
  SERVED_MODEL_NAME=frank-default-large
- frank-default-large.service: systemd unit, User=dank, port 7770
2026-08-10 22:36:37 -07:00
Frank 91188d4b1b docs: add Ling-3.0-flash vLLM-ROCm deployment plan (grilled decisions, port 7770) 2026-08-10 22:02:28 -07:00
Frank 2a7571abdc chore: remove stale root-level duplicates of scripts/ files
- validate-vllm.sh (root) superseded by scripts/validate-vllm.sh
- vllm-qwen36.sh superseded by scripts/serve-vllm-qwen36-dflash.sh
2026-08-10 21:12:48 -07:00
Frank f650fff0aa docs: polish pass — fix stale names, duplicates, branding, and README
- Normalize 'VLLM' to 'vLLM' in prose across 6 docs (32 occurrences; wikilink
  targets untouched)
- Remove duplicated Environment Variables block in 27B Dankclaw doc
- Update stale model refs Qwen3-30B-A3B -> Qwen3.6-35B-A3B in example commands
- Fix VLLM Index: -- separators to em-dashes; correct model names on links
- README: document active services (ROCmFPX llama-server on Dankclaw, vLLM
  AWQ on Dankserver), replace broken [[docs/README.md]] link with docs/index.md
2026-08-10 21:12:23 -07:00
Frank 993b6af576 docs: add DFlash/DSpark speculative decoding research + quantization-by-hardware guide
- DFlash DSpark Speculative Decoding.md: verified method details (DFlash
  block diffusion from Z Lab arXiv:2602.06036; DSpark semi-autoregressive from
  DeepSeek arXiv:2607.05147), runtime support matrix (vLLM/llama.cpp/SGLang),
  exact vLLM --speculative-config recipes (incl. dflash/dspark), llama.cpp
  --spec-type recipes with sidecar auto-discovery, draft model table
  (z-lab Qwen3.6-27B-DFlash 2B, Qwen3.6-35B-A3B-DFlash 0.4B), deployment
  guidance for RTX 3090 (AWQ+Dflash) and Strix Halo (ROCmFPX MTP), measured
  45-50 t/s MTP decode on Strix Halo
- Quantization by Hardware Architecture.md: FP8/INT8/INT4/GPTQ/AWQ/GGUF/FP4/
  ROCmFP4 support per NVIDIA (Turing/Ampere/Ada/Hopper/Blackwell), AMD
  (CDNA MI250/MI300/MI350, RDNA 3/3.5/4), and CPU; recommended picks per
  Dankserver (AWQ/GPTQ 4-bit) and Dankclaw (ROCmFP4/Q4_K_M)
- index.md: link both new pages under Speculative Decoding & Quantization
2026-08-10 21:09:17 -07:00
Frank 90c4883f89 feat: add consistent deployment/update process (deploy.sh + docs + AGENTS.md)
- scripts/deploy.sh: target-aware deploy (dankclaw/dankserver). Pushes main,
  pulls on the target, installs/enables systemd unit, restarts service, and
  checks the health endpoint; --dry-run preview; pre-flight dirty-tree check
- docs/deployment.md: full deployment/update process with mermaid workflow,
  target map, manual update commands, service units, and troubleshooting
- AGENTS.md: add Deployment & Update Process section (deploy.sh usage, target
  map, mermaid workflow) and a Summary table row
- docs/index.md: crosslink deployment doc
2026-08-10 21:04:37 -07:00
Frank 3a64c8f3dd docs: fact-check knowledge base against live machines and vLLM source
Correct stale and incorrect facts after exhaustive verification:
- Dankclaw: NUMA node 0 = 31213 MB; disk 661G/1.1T/38%; vLLM 0.26.0 in
  /home/dank/vllm-rocm-venv (not vllm-env); clarify 96 GiB GPU-visible is a
  driver overcommit ceiling over 30 GiB physical (confirmed via sysfs
  mem_info_vram_total=103079215104)
- Dankserver: disk 729G/140G free/84%; /mnt/entropy 910G free; active service
  is vLLM EngineCore (22 GB), not llama-server; CPU model Ryzen 7 7700X
- index.md: Dankclaw 30GiB phys / 96GiB GPU-visible (was '61 GB unified');
  add deployment topology mermaid diagram
- vLLM defaults (from source): gpu_memory_utilization=0.92, max_num_seqs=128,
  swap_space removed (now --kv-offloading-size) across Overview/Index/RAM/Hybrid
- Quantization: FP8 not native on Ampere (RTX 3090) or RDNA 3.5 (gfx1151);
  add per-model hardware quantization notes; AWQ/GPTQ limited on ROCm
- Speculative decoding: add DFlash, DSpark, MTP, EAGLE3 to feature list
- Confirm Qwen3.6-27B and Qwen3.6-35B-A3B specs are correct (HF-verified)
- Production note: Dankclaw primary llama.cpp service runs ROCmFPX
  Ling-3.0-flash RocmFP4 MTP, not vLLM Qwen3.6-27B
2026-08-10 20:59:33 -07:00
Frank 841d872aa7 sync scripts from remotes: ROCmFPX llama-server.service (dankclaw), dankserver vLLM serve/validate; drop failed-attempt scripts
- llama-server.service: dankclaw migrated to ROCmFPX runtime (Ling-3.0-flash,
  draft-mtp, no-mmap/direct-io) from regular llama.cpp Qwen3.6-27B-DFlash
- serve-vllm-qwen36-dflash.sh: dankserver version (relies on image 'vllm serve'
  entrypoint; HF cache mounted read-write)
- validate-vllm.sh: dankserver multi-stream vLLM validation (4 unique prompts,
  1-4 streams, prompt+completion speed)
- remove superseded scripts: serve-llamacpp-dflash.sh, validate.sh,
  vllm-awq-qwen36-dflash-ampere.sh, vllm-qwen36.service
2026-08-10 19:48:46 -07:00
Frank ced4c6f46e sync: update vllm-awq-qwen36-dflash-ampere.sh from dankserver
- Model: Avesed/Qwen3.6-35B-A3B-INT8-W8A8 (was AWQ 4bit)
- Image: vllm/vllm-openai:nightly (was :latest)
- Spec method: mtp with 2 tokens (was dflash with 12)
- Max model len: 200700 (was 32768)
- Max num seqs: 3 (was 1)
- Max batched tokens: 3072 (was 4096)
- GPU mem util: 0.97 (was 0.96)
- CPU offload: 30GB (was 40GB)
- Add --enable-prefix-caching
- Add --kv-cache-dtype auto
2026-08-10 03:23:09 -07:00
Frank 11d66c3823 Set max-model-len to 32768 for testing 2026-08-09 22:19:32 -07:00
Frank 6bdabfc65b Add VLLM_USE_V2_MODEL_RUNNER=0 to skip V2 model runner MARLIN repacking OOM 2026-08-09 21:49:25 -07:00
Frank 83b0bea29b Fix: move commented speculative config to end to not break bash line continuation 2026-08-09 12:27:28 -07:00
Frank 88aa18ef34 Reduce GPU memory to 75%, add expandable_segments to fix OOM 2026-08-09 12:11:48 -07:00
Frank 9dfa16fae9 Disable speculative decoding - OOM on stable vLLM too 2026-08-09 12:08:26 -07:00
Frank 578c3e8f71 Enable DFlash speculative decoding (12 tokens), increase CPU offload to 20GB 2026-08-09 11:54:40 -07:00
Frank 8c13c7bbaa Add AGENTS.md git workflow rules and initial vllm-awq-qwen36-dflash-ampere.sh from dankserver 2026-08-09 11:54:04 -07:00
Frank ad96733340 Merge PR #1: Update AGENTS.md with target-specific branching and service status 2026-08-09 11:03:12 -07:00