Commit Graph
159 Commits
Author SHA1 Message Date
haylanandClaude Bot 1484907ff8 docs(research): add inference engine, spec decoding and multi-GPU research
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 19:42:45 +01:00
haylan a89cccb3d5 chore(env): set LLAMA_CACHE_RAM to 0 in .env.example 2026-10-31 19:04:40 +01:00
haylan c25e7e835f chore(env): reduced LLAMA_CACHE_RAM value in .env.example 2026-10-31 18:49:30 +01:00
haylanandClaude Bot 8927e440aa feat(llm): make spec decoding and KV cache type .env toggles
Move all speculative-decoding flags into LLAMA_SPEC_ARGS (blank = off)
and the KV cache quant into LLAMA_KV_CACHE_TYPE, so token-corruption
A/B tests are a single .env edit instead of a compose edit.
Replaces LLAMA_DRAFT_MODEL_FILE and LLAMA_SPEC_N_MAX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:22:44 +01:00
haylanandClaude Bot 7d142ed59d fix(models): correct DFlash2 Q8_0 drafter download URL
The URL used the filename as the Hugging Face repo name. Also align
the compose fallback for LLAMA_DRAFT_MODEL_FILE with Q8_0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:01:27 +01:00
haylan e4febb5beb fix(models): update LLAMA_DRAFT_MODEL_FILE and its URL to correct variant 2026-10-31 16:59:34 +01:00
haylan d5712d5fd4 chore(models): update LLAMA_DRAFT_MODEL_FILE and its URL to use BF16 variant 2026-10-31 16:54:15 +01:00
haylanandClaude Bot 8144286946 refactor(models): merge downloaders into one, driven by models.yml
Replace the per-model downloader services with a single downloader
that reads file/url pairs from models.yml. Downloads now go to a
.part file first, so an interrupted run can't leave a truncated
model that later runs skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:48:58 +01:00
haylanandClaude Bot 28c102e0d9 feat(bench): add scripts/bench.sh wrapper for speed-bench runs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:45:27 +01:00
haylanandClaude Bot 68348aad72 feat(bench): add speed-bench tool service for drafter benchmarks
Runs llama.cpp's SPEED-Bench client (pinned commit) against
llama-server over the compose network, in the tools profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:43:06 +01:00
haylanandClaude Bot f4bc4dd7fa fix(llm): drop --cache-reuse, unsupported by this model's context
Startup log: 'cache_reuse is not supported by this context, it will be disabled'.
Correct architecture.md, which claimed it fixed the SSE timeout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 21:12:07 +02:00
haylanandClaude Bot 408ed3e586 feat(llm): raise prompt cache RAM budget via --cache-ram
Log shows 253 prompt-cache evictions and 146 full ~42k re-prefills at the default budget.
Add LLAMA_CACHE_RAM and the throughput-tuning research note.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 21:05:27 +02:00
haylanandClaude Bot 433ebc6597 docs(research): mark opencode-cli-setup as v1-era
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:36:27 +02:00
haylanandClaude Bot d9fc3418a1 docs(opencode): document v2 config, mark v1 deprecated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:32:58 +02:00
haylanandClaude Bot 17747694bd feat(llm): switch to DFlash2 speculative decoding, drop qwen-classifier
Replace MTP with draft-dflash and a separate DFlash2 drafter GGUF.
Remove the qwen-classifier backend to free VRAM (GPU was at 100%).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:28:55 +02:00
haylan 1e3ad169c0 chore(llm): univyed token size for agent usage 2026-10-03 14:06:56 +02:00
haylan b74c0e0ccc chore(config): revisteded ai configuration for opencode 2026-10-02 06:53:33 +00:00
haylan 1989ec9383 reduced context of small modell 2026-09-25 08:17:42 +02:00
haylan a3437e9cc7 chore(ai): enalbeld mtp mode 2026-09-25 08:13:23 +02:00
haylan ea07daa3cc Merge pull request 'Docs cleanup: restructure, move code comments into docs, remove image generation' (#65) from docs/cleanup-and-restructure into main
Reviewed-on: #65
2026-09-24 20:01:30 +00:00
haylanandClaude Bot e27f5c03b6 docs(agents): add writing-docs guide and new-term procedure
docs/agents/writing-docs.md holds the doc/comment rules and done-check,
reached via a pointer in CLAUDE.md (AGENTS.md and QWEN.md import it).
docs/agents/domain.md gains the procedure for new or conflicting terms.

Refs #55 (agent guide #62)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:52:19 +02:00
haylanandClaude Bot 05effe5c88 chore: move code comments into docs, leave one-line pointers
Explanations from docker-compose.yml, .env.example and
scripts/update.sh now live in docs/architecture.md, gateway.md,
network-access.md and operations.md. Code keeps `# see docs/...`
pointers, one-line warnings (storage key, SSRF guard, WAL grace period,
git pull ordering) and "auto-filled — leave blank" markers.

Refs #55 (comment destination map #61)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:52:00 +02:00
haylanandClaude Bot a0e5e9704b docs: restructure around source-of-truth pages
- CONTEXT.md glossary
- README reduced to intro, quickstart and doc index
- new architecture.md, gateway.md (from proxy-key-onboarding.md),
  operations.md; network-access.md rewritten
- coding-cli-setup: stale OMNIROUTE_PORT:-4000 endpoint, terms and
  duplicated per-slot/classifier explanations fixed
- research/README.md index; proxy-request-priority.md moved there as
  superseded

Every doc names keys instead of restating values and links its source.

Refs #55 (#56, #57, #59, #60)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:51:01 +02:00
haylanandClaude Bot 072eeb78c2 fix(qdrant): bind port to loopback only
qdrant has no auth; it was reachable from the whole LAN.

Refs #55 (intent vs. source #63)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:47:16 +02:00
haylanandClaude Bot fd55ce6669 chore: remove image generation, Open WebUI, Lazytainer and neo4j
Drops the comfyui, downloader-comfyui, open-webui, lazytainer and neo4j
services with their volumes, env keys and update.sh steps, plus
scripts/switch-model.sh and the two image-generation research docs.

Refs #55 (removal inventory #58, intent vs. source #63)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:47:12 +02:00
haylanandClaude Bot 8ae32102f9 feat(open-webui): add chat+image frontend, bypass omniroute for comfyui
OmniRoute's built-in comfyui provider hardcodes a CheckpointLoaderSimple
(single-file-checkpoint) workflow with no override (confirmed by
reading open-sse/handlers/imageGeneration/providers/comfyUI.ts
upstream), so it can't drive Qwen-Image 2.1's split unet/text-encoder/
vae GGUF loader chain. Open WebUI's own ComfyUI image backend is fully
generic instead — any exported workflow_api.json with arbitrary node
IDs mapped to parameters — so it can point straight at comfyui:8188.

Chat still goes through omniroute like every other client, via a
per-workload key (OPENWEBUI_OMNIROUTE_KEY, minted by hand same as
always). Published on host port 8008 per user request.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 23:28:44 +02:00
haylanandClaude Bot d09a99accd fix(comfyui): seed custom_nodes/input/output/user dirs under --base-directory
main.py crashed on boot (FileNotFoundError on /storage/custom_nodes) -
--base-directory fully relocates custom_nodes/input/output/user/temp
under it, it doesn't create them or fall back to the image's own
ComfyUI/custom_nodes (which has ComfyUI-Manager baked in). Seed
/storage/custom_nodes from the image's copy on first boot only (skips
once populated), so Manager survives the base-directory switch and
persists across recreates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 23:09:27 +02:00
haylanandClaude Bot 9903b66094 fix(comfyui): correct HF subfolder paths for text encoder/VAE download
abenzerps/Qwen-Image-2.1-Uncensored-GGUF keeps the diffusion GGUFs at
repo root but the companion text encoder and VAE under text_encoders/
and vae/ subfolders — confirmed via the HF API's file listing, not
present in the file list used when these URLs were first written.
404'd on first real run. Local storage paths are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 23:04:07 +02:00
haylanandClaude Bot 78adbf4cdf fix(update.sh): remove stale downloader-fast call
That service was merged into llama-server a while back (see the
comment on llama-server-fast's old alias), but update.sh's set -euo
pipefail meant every run since has hard-exited there — silently
skipping downloader-comfyui and the final `docker compose up -d`
recreate step on every invocation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 23:02:38 +02:00
haylanandClaude Bot 69d0d76d49 fix(comfyui): add missing launch command, drop dead PUID/PGID vars
yurisasc/comfyui-rocm7.1 has no entrypoint/CMD of its own (drops into
bash) and never reads PUID/PGID/VIDEO_GID/RENDER_GID/BASE_STORAGE_PATH
- confirmed by inspecting the image directly. Without an explicit
command the container just exits 0 immediately and restart-loops
forever with zero log output, which is what was actually blocking
comfyui.home/8138, unrelated to the earlier GGUF model swap.

Add `command: python main.py --listen 0.0.0.0 --port 8188
--base-directory /storage` (the real way to point it at the storage
volume) and remove COMFYUI_PUID/COMFYUI_PGID, since nothing consumes
them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 23:01:24 +02:00
haylanandClaude Bot 38ec636fb5 chore(scripts): mark switch-model.sh executable
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 22:43:36 +02:00
haylan db1ef90688 Merge remote-tracking branch 'origin/tool-cassefier-model' 2026-09-22 22:39:21 +02:00
haylanandClaude Bot 4e310741c7 feat(comfyui): switch to Qwen-Image 2.1 uncensored GGUF model
Replace the Comfy-Org FP8 safetensors split with abenzerps'
Qwen-Image-2.1-Uncensored-GGUF (Q4_K_M diffusion weights + int8 text
encoder + bf16 VAE). GGUF weights land in models/unet per
ComfyUI-GGUF's convention instead of models/diffusion_models.

Flagged as unconfirmed: whether yurisasc/comfyui-rocm7.1 already
bundles the ComfyUI-GGUF custom node needed for the "Unet Loader
(GGUF)" node — check on deploy and install manually if absent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 22:38:27 +02:00
haylan a3f1099bfc docs(research): OmniRoute memory tools hijack classifier tool-call, x-omniroute-no-memory fix 2026-09-15 23:31:58 +02:00
haylan ed90256f43 docs(research): trace 48-min outage to third OmniRoute timeout and open ROCm#6630 GPU hang 2026-09-15 23:31:58 +02:00
haylan fa852c8fb4 docs(research): qwen-classifier needs no context-window match; 8B/30B won't fit VRAM 2026-09-15 23:31:58 +02:00
haylan edad6b2249 Merge branch 'research/opencode-auto-compact' 2026-09-14 07:44:32 +02:00
haylan 2250e804db Implement code changes to enhance functionality and improve performance 2026-09-11 13:15:30 +02:00
haylanandClaude Bot e31647812a fix(omniroute): raise REQUEST_TIMEOUT_MS and enable --cache-reuse to stop non-ping SSE stream aborts
STREAM_IDLE_TIMEOUT_MS was raised to 180s on 2026-09-09 to give contended
llama-server prefill room to produce a first token, but qwen-code sessions
kept hitting "Stream produced no non-ping SSE event within 95000ms" the very
next morning. Per OmniRoute's own docs, that's the wrong timer: the first
non-ping SSE event's deadline inherits REQUEST_TIMEOUT_MS (default 10 min,
computed as remaining budget after retries/cooldowns), not
STREAM_IDLE_TIMEOUT_MS (which only bounds gaps between chunks once streaming
has already started).

Two changes:
- Add REQUEST_TIMEOUT_MS=1800000 (30 min) on the omniroute service, exposed
  as OMNIROUTE_REQUEST_TIMEOUT_MS like the existing stream-idle var. Safety
  margin, not the root-cause fix.
- Add --cache-reuse 256 to llama-server: it had no KV-cache reuse configured,
  so every request reprefilled its full prompt from scratch even when most
  of a conversation's prefix was unchanged. This is the actual fix for why
  compact-prompt prefill was slow enough to hit the timeout in the first
  place.

Documents the distinction and root cause in docs/research/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqWBahogLCkrXNfzCSvcVc
2026-09-10 10:12:02 +02:00
haylanandClaude Bot 930e407053 docs(llm): document qwen-classifier reality, add --reasoning off safety net
- docker-compose.yml: add --reasoning off to qwen-classifier per
  fast-model-choice.md's own recommendation (ggml-org/llama.cpp#20809
  safety net) — missed in the original rollout, caught while writing
  this up.
- docs/coding-cli-setup/qwen-code.md: rewritten to match what's actually
  deployed (qwen-classifier, partial GPU offload, 65536 ctx, Q4_K_XL) —
  previously described an unimplemented llama-server-fast/8192-ctx plan.
  Documents the non-interactive MCP tool allow-list gap found live-testing.
- docs/coding-cli-setup/opencode.md: fix stale 65536 example that didn't
  match its own documented LLAMA_CTX_SIZE/LLAMA_PARALLEL formula (131072).
- docs/research/fast-model-choice.md: implementation note recording where
  the actual rollout diverged from this doc's original recommendations
  (service name, quant, context size, CPU-first-then-GPU path).
- docs/research/omniroute-account-semaphore-timeout.md: new — the
  hardcoded 30s per-connection semaphore timeout found during the
  pr-agent investigation, root-caused against OmniRoute's own source,
  and the maxConcurrent:null + providerSpecificData.timeoutMs fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 19:10:32 +02:00
haylanandClaude Bot 76043e2c6f tune(llm): partial GPU offload for qwen-classifier, real headroom
Full offload (999 layers) left only ~768MB free VRAM regardless of
batch-size/flash-attn tuning — that gap tracks roughly fixed regardless
of those knobs, most likely ROCm's own per-process HIP context overhead
(same ROCm#5706 quirk already noted for two HIP contexts sharing this
card, see llama-server's GPU_MAX_HW_QUEUES comment above). Dropping to
28/36 layers on GPU (6 layers + their KV on CPU) trades a slice of
speed for real freed VRAM — still >80% of layers on GPU, nowhere near
CPU-only's unusable latency. Verifying live before locking this number in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 18:10:39 +02:00
haylanandClaude Bot 1102273384 fix(llm): enable flash-attn on qwen-classifier, real VRAM cause found
Batch/ubatch reduction barely moved measured VRAM (~768MB free, same as
before) — wrong lever. llama-server runs with --flash-attn on; this
service didn't. Without it, the unfused attention compute buffer at
65536 ctx is far larger than flash-attn's fused workspace, which is
what the naive weights+KV estimate missed. Matches llama-server's flag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 17:04:05 +02:00
haylanandClaude Bot ba9ace6f71 fix(llm): shrink qwen-classifier's compute buffer for real VRAM headroom
Measured live: full-offload weights+KV (~4.9GiB estimate) actually used
~5.85GiB, leaving only ~700MB free on the R9700 — too tight, real OOM
risk for either GPU process. The gap was compute-buffer/graph overhead
the naive estimate didn't account for. Drop --batch-size/--ubatch-size
well below llama-server's defaults (2048/512) to shrink it — a
single-request classifier has no batching throughput to lose.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 17:02:44 +02:00
haylanandClaude Bot 8e2650807c fix(llm): move qwen-classifier to GPU, right-size context
CPU-only was too slow in practice: real classification calls blew past
OmniRoute's 60s timeout and retry-looped (504/499). Moved to GPU.

Also traced qwen-code's actual classifier transcript cap in its source
(MAX_TRANSCRIPT_MESSAGES=40, MAX_HISTORICAL_ACTION_CHARS=4000/message) —
worst case is ~40-50K tokens, not the 131072 originally set in
settings.json (copied from the main model's entry, not a real qwen-code
requirement). Dropped ctx-size to 65536 (~1.5x margin) so Q4_K_XL
weights + q4_0/q4_0 KV fit fully on GPU (~4.9GiB) inside the ~6.1GiB
free on the R9700, instead of needing partial CPU/GPU offload.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 16:59:02 +02:00
haylanandClaude Bot 4353e5c0e8 merge: follow-up fix for qwen-classifier model file
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 16:38:11 +02:00
haylanandClaude Bot 20cc0bcc70 fix(llm): point qwen-classifier at the Q8 GGUF already on disk
The Q4_K_M-class file this originally specced didn't exist yet on
gameserver (classifier crash-looped: "No such file or directory").
A Q8_K_XL GGUF for the same model was already sitting in the models
volume from something earlier — point at that instead of downloading a
new file, and drop the KV cache quant to q4_0/q4_0 to keep total RAM
comfortable now that the weights are the larger Q8 variant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 16:37:54 +02:00
haylan c1e30ec9bb Merge pull request 'Fix/omniroute pr agent timeout' (#54) from fix/omniroute-pr-agent-timeout into main
Reviewed-on: #54
2026-09-09 14:29:13 +00:00
haylan b3a64fe4b5 chroe(chore): added markdown for harnesses 2026-09-09 16:28:42 +02:00
haylanandClaude Bot 828bd4c046 feat(llm): dedicate a CPU-only backend for the qwen-code tool-call classifier
fastModel in ~/.qwen/settings.json (permissions.autoMode.classifier) was
aliased onto llama-server's own 27B connection, so every tool-call safety
check queued behind whatever heavy generation was already running on that
model's 2 GPU slots.

Add qwen-classifier: a separate llama.cpp instance, CPU-only, running
Qwen3-4B-Instruct-2507 (the smallest Qwen3 with native >=131072 context,
qwen-code's requirement, without lossy RoPE scaling). Structurally isolated
from llama-server's queue instead of sharing it. Sized for gameserver's
~17GiB free system RAM: q8_0/q8_0 KV at full 131072 ctx (~9.8GiB) + Q4_K_M-
class weights (~2.3GiB) fits comfortably, with better KV quality than the
q4_0 that would've been needed to fit this on the GPU's ~6GiB free VRAM.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 16:26:51 +02:00
haylan 16df051318 docs(research): add ponytail audit report highlighting over-engineering and complexity issues 2026-09-09 08:22:31 +02:00