Most Local LLM Speedups Are Noise. This Agent Skill Finds the Real Ones.
inference-optimisation-skill makes your agent compute the speed ceiling first, then accept only the wins that survive a control run and a long-context test.
Ask anyone who runs models at home how fast their setup is, and you'll get a number. Ask how they know, and the answer usually gets vague. They changed a flag, ran one prompt, and the tokens came out quicker.
That's the trap. Run the exact same prompt twice on the same machine and the speed moves. A new open-source agent skill puts the size of that wobble at "±5–10%" and adds the line every local AI forum should pin: "Most single-run 'wins' are drift."
The skill is inference-optimisation-skill from sybil-solutions, and it showed up in Trendshift's mentions this weekend, the same weekend a beginner's guide to local AI hit about 710 points on Hacker News. Lots of people are setting up local models right now. Far fewer can tell a real speedup from a lucky run.
What the skill does is make a coding agent tune your local LLM server the way a careful engineer would. It works out the fastest your hardware could possibly go before touching anything. It changes one setting at a time. It sandwiches every test between two control runs. And it won't call a config "best" until that config still answers correctly with a full context window.
The shift is small to describe and big in practice: tuning stops being vibes and becomes an experiment with a log.
What a "skill" is, and what this one covers
A skill, in the SKILL.md format Claude Code popularized, is a folder of instructions and scripts an agent loads when a task matches. Think of it as a checklist plus tools, handed to the agent at the right moment. This one is a long checklist, a few Python and shell scripts, and reference notes. The README says it works with Claude Code and "any agent that loads SKILL.md-style skills," and any model can follow it from the included PROMPT.md.
Its job is speed for a local server that answers OpenAI-style API calls. That covers the speed of a single chat (decode, how fast tokens stream out once an answer starts) and the speed with several users at once. It also covers prefill (how fast the model reads your prompt before answering), the wait before the first token appears, startup time, and how much conversation memory fits (the KV cache).
The SKILL.md names vLLM, SGLang, llama.cpp, ExLlama/TabbyAPI, MLX and TensorRT-LLM as engines, and the benchmark script talks to "any OpenAI-compatible server." Hardware listed: NVIDIA, AMD, Intel, Apple and unified-memory laptops. Ollama isn't named. It does expose an OpenAI-compatible endpoint, so the benchmark script may run against it, but the engine-specific advice won't apply.
Step one: work out the ceiling before you touch anything
This is the part that changed how I'd approach local tuning.
When a model writes a token, it has to read most of its weights from memory. So the top speed for one user is roughly the memory bandwidth divided by the bytes read per token. It's the same arithmetic as a delivery van: you can't make more trips per hour than the road allows, however good the driver is.
The skill makes the agent do that sum first, with measured numbers, not spec-sheet ones. It measures real bandwidth with a memory copy and real compute with a large matrix multiply. Then it computes ceilings for decode, prefill, first-token time and startup, using scripts/ceiling.py. For mixture-of-experts models (models that only use a slice of their weights per token), it counts only the experts that actually run.
Then it reports progress as a percentage of that ceiling. If your target is above the ceiling, the SKILL.md says to "say so early with the arithmetic." That one rule saves a weekend of chasing a number your hardware can't produce.
Step two: test like you mean it
The rules for each experiment are where the skill earns its keep. From the SKILL.md:
- One change per experiment. Each test gets its own config file, derived from the current best.
- Controls on both sides. Run the control, then the candidate, then the control again. Take at least six samples and use the median.
- A strict accept rule. A change wins only if it beats both neighboring controls on its target metric and makes nothing else more than about 3% worse. Repeat any surprising win.
- A fixed environment. AC power, a fixed performance profile, an idle machine, no other GPU jobs. The script flags runs on battery.
- Check the output, not just the speed. The benchmark flags looping or broken output and failed requests, because "a suspiciously fast result is usually broken output."
- Count tokens honestly. "Token counts come from server usage stats, never from streamed chunks."
Then come the stability gates. A config only becomes "best" after a long-context needle test, where a fact is hidden in a document filling about half, then all, of the context window and the model has to find it "exactly." If the change is supposed to be lossless, the model's greedy output (the same output every time, no randomness) has to match too. That rule exists for the tweak that speeds things up by breaking long prompts, which a short test prompt would never show.
Everything lands in a PLAN.md log and a ledger.jsonl file, failures included. The skill also tells the agent never to rerun a rejected experiment "without a new reason."
The levers it tries, cheapest first
Once the ground rules are set, the agent loops: measure, pick the most promising lever, test it against controls, keep or reject it with a reason. The lever order runs from cheap settings to expensive kernel work:
- Persistent compile and graph caches, which the SKILL.md credits with cutting startup by 50 to 70%.
- Decode graphs (CUDA or XPU graphs, which record the GPU's work once and replay it), "often 2× c1 on their own," where c1 means single-user speed.
- Speculative decoding, where a small fast guesser drafts tokens and the big model checks them in a batch.
- Concurrency and KV cache sizing, including confirming that prefix caching actually hits.
- Prefill settings, with lossy int8 or fp8 options labelled as quality trades.
- Kernel thread and tile sizes, then real kernel work only after the cheap levers plateau.
It declares a plateau when "three consecutive levers land inside noise," then writes up where things stand.
What the numbers look like
The README's showcase is an Intel Arc B390 laptop chip with 64 GB of shared memory, running a 35B mixture-of-experts model through SGLang. Single-user decode went from 43.6 to 53 tokens a second. Prefill on a 256K-token prompt went from 297 to 628 tokens a second, about 2.1×. Startup fell from 113 to 43 seconds.
The README is candid about the gap that's left. Decode reached "about 55%" of the practical target, and "the rest is GEMV kernel efficiency," meaning the remaining speed is locked in the low-level matrix-vector math code, not in settings. Prefill at 256K landed at 628 tokens a second against a ceiling of about 670 to 684. Being told how close you are, and why you can't go further, is the part most tuning guides never give you.
Other results in the README include an RTX 3090 running a 27B model at 96.2 tokens a second for one user with speculative decoding. Keep in mind whose numbers these are. They're the project's own measurements on its own hardware.
Put it into practice
You need a local server already running with an OpenAI-compatible endpoint, Python 3, and a machine you can leave alone for a while.
Install into Claude Code at user level, verbatim from the README:
git clone https://github.com/sybil-solutions/inference-optimisation-skill
mkdir -p ~/.claude/skills
cp -r inference-optimisation-skill/skills/inference-optimisation ~/.claude/skills/
git -C inference-optimisation-skill rev-parse HEAD # note the commit you installed
The last line is mine. With no tagged releases, writing down the commit is the only way to know which version of the rules your agent followed.
Then ask your agent something like the README's own examples:
"what's the theoretical max tok/s for this model on this machine?"
"hill-climb decode and prefill for the model on :8000 under a 40 GiB cap"
Start with the first question. It's cheap, it touches nothing, and the answer tells you whether tuning is even worth an evening.
If you'd rather drive it yourself, the README has a no-agent quick start. Run it from inside the cloned folder:
S=skills/inference-optimisation
python3 $S/scripts/ceiling.py $S/examples/ceiling-ornith-b390.json
mkdir -p configs && cp $S/examples/config-existing-server.json configs/base.json # edit base_url/model
python3 $S/scripts/bench.py run configs/base.json --long 131072
cp configs/base.json configs/cand.json # change the one setting you're testing
bash $S/scripts/queue.sh base cand base
python3 $S/scripts/bench.py show
I added the cp line: the README's version skips creating the candidate config that queue.sh expects, and the script also needs Bash and the flock file-locking command, which macOS doesn't ship by default. The queue.sh base cand base line is the control-candidate-control sandwich in one command. Even if you never let an agent near your server, that line and the ceiling script are worth stealing.
What to expect: a baseline run, a ceiling report, and then a slow, boring sequence of experiments, most of them rejected. That's the skill working.
Honest limitations
The benchmarks are self-reported. Every before-and-after figure in the README comes from the authors, on named hardware, with raw data said to live in their other repos. Treat them as an existence proof, not a promise for your card.
It takes over the machine. The rules want an idle host, AC power and one GPU job at a time, serialized through queue.sh. You won't be gaming or running another model while it hill-climbs.
Your agent will run commands on your box. The skill tells the agent to restore any changed performance profile and tell you, never to force-kill a server mid-batch (it notes this "has caused GPU driver faults"), and never to print credentials. Those are instructions to a model, not guarantees. Watch the first session.
"OpenAI-compatible" has fine print. The benchmark script expects streamed chat responses that include usage statistics, so a server that skips them will give you bad token counts or errors. A quick test: send one streamed chat request with "stream_options": {"include_usage": true} and look for a usage block at the end of the stream.
Some advice assumes a serving engine. Graph capture, speculative decoding with a model's built-in draft heads (MTP) and custom kernels are settings of engines like vLLM, SGLang and ExLlama. On a simple desktop app, the ceiling math and the A/B method carry over; many levers won't.
No releases yet. The repo has no tagged releases, so pin a commit if you depend on it. It's MIT licensed.
The question to ask before the next speedup
Next time a post promises a 30% boost from one flag, you'll have two questions ready. What's the ceiling on that hardware? And did the boost beat a control run on both sides?
Clone the skill, ask it for the ceiling on the model you already run, and see how far from it you are. That one number will tell you whether to spend the weekend tuning or go back to building.
Sources: inference-optimisation-skill README, SKILL.md (main branch, read November 23, 2026; no tagged releases), GPU Partner local AI guide, Trendshift repo page, Hacker News thread.