sybil-solutions/inference-optimisation-skill

The skill covers single-user and concurrent decoding, speculative decoding, prefill, KV cache capacity, startup time, and time-to-first-token latency. The agent first calculates theoretical upper bounds based on bandwidth and compute, then changes only one variable at a time, alternates between candidate and control configurations, takes the median, and accepts a change only if it outperforms both preceding and succeeding controls while other metrics degrade by no more than 3%. Finally, it must pass long-context "needle-in-a-haystack" retrieval and full-KV-cache concurrency stress tests, then reproduce results using a clean build of a fixed version. The scripts directory contains benchmarking tools written in pure standard-library Python and bash, compatible with any service exposing an OpenAI-compatible interface. The README lists several tuning efforts from which it was distilled; for example, the author claims to have improved single-user decoding for a 35B-A3B model on an Intel Arc B390 integrated GPU from 43.6 to 53 tok/s, and accelerated 256K prefill by 2.1x.

The skill covers single-user and concurrent decoding, speculative decoding, prefill, KV cache capacity, startup time, and time-to-first-token latency. The agent first calculates theoretical upper bounds based on bandwidth and compute, then changes only one variable at a time, alternates between candidate and control configurations, takes the median, and accepts a change only if it outperforms both preceding and succeeding controls while other metrics degrade by no more than 3%. Finally, it must pass long-context "needle-in-a-haystack" retrieval and full-KV-cache concurrency stress tests, then reproduce results using a clean build of a fixed version. The scripts directory contains benchmarking tools written in pure standard-library Python and bash, compatible with any service exposing an OpenAI-compatible interface. The README lists several tuning efforts from which it was distilled; for example, the author claims to have improved single-user decoding for a 35B-A3B model on an Intel Arc B390 integrated GPU from 43.6 to 53 tok/s, and accelerated 256K prefill by 2.1x.

Why it matters It codifies the author's methods for speeding up inference on Intel and NVIDIA GPUs and multi-GPU servers into a process; speedups that fail long-context retrieval tests do not count, and failed attempts are also documented.

Stars 2822 (+118 / 24h)

Rationale

  • 118 new stars in 24 hours, total stars 2822 (indicating attention only); MIT license, created on 16 11
  • Each result specifies hardware, model, quantization, and inference engine, with links to full tuning logs and raw data

Usage

  • Claude Code: git clone the repository, copy skills/inference-optimisation to ~/.claude/skills/, then say "tune decoding and prefill for the model on :8000 within a 40 GiB memory limit"; other agents can read SKILL.md directly or use PROMPT.md as a task prompt
  • Without an agent, you can first run ceiling.py to calculate upper bounds and bench.py to benchmark an existing service once

Risks

  • Tuning involves repeatedly restarting inference services over extended periods and saturating VRAM; it is best performed on machines not serving production traffic
  • The speedup figures in the tables are the author's results on their specific hardware; they may not be reproducible with different models or engine versions

Open

GitHub

Explore the latest AI Radar updates