rea-analysis-optimization
MOmorluto/rea485k9,215 new stars in the last 7 days
Hill-climb the serving speed of a local LLM on any hardware (NVIDIA, AMD, Intel, Apple, unified-memory laptops, multi-GPU) and any quantization (GGUF, EXL2/EXL3, AWQ/GPTQ, FP8, MLX, BF16): single-user and concurrent decode tok/s, speculative decoding, prefill tok/s, KV cache size, startup time and TTFT, under a memory cap and with full-context stability. Computes the theoretical ceiling first, runs noise-controlled A/B experiments, keeps a ledger, and qualifies the winner before publishing it. Use when asked to optimise, tune, speed up, benchmark or hill-climb a model server (vLLM, SGLang, llama.cpp, ExLlama/TabbyAPI, MLX, TensorRT-LLM...), to find the maximum possible tok/s on a machine, or to publish a tuned recipe. Triggers: hill climb, tok/s, decode speed, prefill speed, MTP, EAGLE, draft model, speculative decoding, KV cache, TTFT, startup time, theoretical maximum.
You improve how fast a model server runs on one machine, with evidence. The loop is:
Detailed references, read when needed:
references/ceilings.md: how to compute theoretical maxima. It includes a worked example.references/methodology.md: measurement pitfalls and statistics.references/levers.md: levers by area, ordered by typical payoff, with measured evidence.references/gotchas.md: engine- and hardware-specific traps.references/publishing.md: qualification gates, pinning, poster and report.scripts/: an engine-agnostic harness. It has a bench, ceiling calculator, memory watchdog, serialized queue and ledger.PLAN.md: a timestamped log of every experiment, with numbers, verdict and reason.THEORY.md: the ceilings.ledger.jsonl: one line per run, from the harness.configs/: one JSON per run.best-config.json.Compute the theoretical maximum for each metric before optimising (scripts/ceiling.py, references/ceilings.md):
Report progress as a percentage of the practical ceiling. If the user's target is above the ceiling, say so early, with the arithmetic.
scripts/queue.sh).
pkill -f/pgrep -f patterns that can match your own shell.setsid nohup … &) so they survive agent restarts.drm-resident-* in /proc/<pid>/fdinfo, nvidia-smi, or ioreg/vm_stat on Apple) plus process anonymous memory.PLAN.md, including failures and why they failed. Negative results are the most reusable output.baseline → profile → pick the lever with the largest (ceiling gap × likelihood) → config → A/B with controls
↑ ↓
└──────── update best-config + PLAN.md + ledger ←──── accept / reject with reason ←───────┘
Cheapest first; see references/levers.md for evidence.
cached_tokens > 0.Declare a plateau when three consecutive levers land inside noise. Write a STATUS section in PLAN.md with:
Then keep the loop alive at a slower cadence if the user said "don't stop", or hand back.
See references/publishing.md.
MOmorluto/rea485k9,215 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days