<< All versions

Skill v1.0.1

currentAutomated scan100/100
jcrabapple/hermes-skills/llm-performance-benchmark

+3 new

──Details
PublishedNovember 21, 2026 at 10:11 PM
Content Hashsha256:4ccbba4c90cc672d...
Git SHA7c2975d79a3d
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 8.1 KB)
SKILL.md8.1 KBactive
SKILL.md · 94 lines · 8.1 KB

name: llm-performance-benchmark description: > Find LLM tokens-per-second (TPS), latency, and throughput metrics. If direct API benchmarking is impossible, pivot to published third-party benchmarks and provide a manual fallback script. trigger: > User asks for model speed, TPS, tokens per second, throughput, latency, or performance benchmark of a specific LLM. metadata: version: "1.0.1"


LLM Performance Benchmark

1. Attempt Live Benchmark (if possible)

  • If an API key is available and unmasked, run a timed generation (e.g., 400–500 tokens) and compute TPS = completion_tokens / elapsed_time.
  • Pitfall: Config files may redact keys. Do not spend more than 2–3 attempts trying to extract a masked key.
  • For this user, NanoGPT keys live in the Hermes env file — launch benches with env -u PYTHONPATH so the project python doesn't inherit Hermes' PYTHONPATH and break on imports.

1b. Live Streaming Benchmark Workflow (proven)

Run scripts/bench_stream.py — it streams an OpenAI-compatible chat completion and reports TTFT (first byte and first content token), decode tok/s, end-to-end tok/s, and usage per trial:

env -u PYTHONPATH python3 bench_stream.py <model> [<model> ...] --trials 3 --max-tokens 700
  • Measure BOTH TTFT variants: first byte and first content token. Routed models (GLM-class) emit placeholder/sideband bytes seconds before any content, so byte-only TTFT understates perceived latency by 2s or more.
  • Compare models the user actually faces: the session's live model AND the config.yaml default. They drift apart (desktop picker overrides config), and a benchmark of only one answers the wrong question.
  • Add a long-context variant (~14K tokens filler, short answer) to measure prefill; divide prompt_tokens by TTFT for an effective prefill rate. Repeat trials hit provider prefix cache — use the COLD trial for prefill, note the cache hit separately.
  • Add a reasoning-enabled variant ("reasoning": {"enabled": true, "effort": "high"} in the request body) when the model may emit thinking tokens; count reasoning_tokens separately from content.
  • Run long jobs via background terminal + process_manage wait, then read the full log with log — foreground output truncates the head, which is exactly where trial 0 lands.
  • Cap background wait at 180s (hard clamp); keep each bench batch under it.
  • Single-shot streaming from a home connection, sequential runs: TTFT includes ~100-200ms of local network. NanoGPT is a router — upstream pod assignment varies run to run, so report ranges, not point values. Each call costs real money (fractions of a cent); a dozen trials is fine, don't loop hundreds.
  • When comparing a session currently in use, also read the Hermes session's own usage records (cost_status, billing_provider): a custom billing provider with no api_mode prices turns at $0.00/unknown — flag that to the user instead of silently reporting $0.

1c. Multi-dimension Suite (proven)

When the user asks for a "thorough" or comparative benchmark, one latency pass is not enough. Run four suites and label them separately:

  1. Correctness with executed verification — don't eyeball outputs. Math tasks: require a trailing ANSWER: token and grep for it. Code tasks: extract the fenced block and actually run it against asserts via subprocess.run([sys.executable, tmpfile]). Extraction tasks: parse the JSON and assert field values. Structured-format tasks: count/verify lines.
  2. Latency stats — 5+ reps per prompt category (tiny chat, reasoning, coding, longform), report p50 and p95 of total time plus p50 TTFT, never single reps. Use temperature 0.
  3. Long-context needle recall — build a synthetic doc with planted facts at ~25% and ~75% depth, ask for both, string-match the answers. Record prompt_tokens / total_seconds as effective prefill tok/s.
  4. Concurrency probe — thread-pool 8/16/32 simultaneous small requests; record errors, 429s, and aggregate tok/s.
  • Budget max_completion_tokens generously (2-3x expected answer) in correctness runs — a reasoning model burns the cap on thinking before emitting the answer, and a truncation mid-sentence reads as a capability failure. When a task fails, retry with headroom before scoring it FAIL.
  • Build needle docs with a seeded RNG so retests reproduce the exact same document.
  • Run independent model suites in parallel with ThreadPoolExecutor; a full four-model suite costs cents.
  • For a same-model cross-provider comparison, use identical prompts and label each backend explicitly in result dicts — colliding labels overwrite rows in saved JSON.

See references/correctness-tasks.md for the proven task set and verifier patterns.

2. Pivot to Published Benchmarks

If direct measurement is impossible, immediately search for third-party benchmark data.

Trusted Aggregators (search these first)

SiteWhat it tracksURL pattern
Artificial AnalysisProvider-level TPS, TTFT, priceartificialanalysis.ai/models/<model>/providers
DeepInfra BlogProvider shootouts (Groq, Fireworks, etc.)deepinfra.com/blog/<model>-api-benchmarks
LLM-StatsLeaderboard rankings, quality scoresllm-stats.com/models/<model>

Search Queries to Use

"<model-name>" tokens per second benchmark throughput
"<model-name>" API provider benchmark artificialanalysis

3. Watch for Model Name Confusion

  • Moonshot models: kimi-k2.6 is the current flagship; kimi-k2-0905 / kimi-k2-0711 are earlier K2 series variants. Do not conflate them.
  • Always verify the exact model string in the provider's official model list.

4. Summarize Results

Present:

  • Output speed range (median t/s per provider)
  • TTFT (time to first token) — especially important for reasoning models
  • Provider spread (same model can be 3× faster on Groq vs Fireworks vs official API)
  • Caveats (reasoning tokens, context-length effects, 72-hour median vs burst speed)

5. Benchmark Script

The repo ships scripts/bench_stream.py (streaming TTFT/decode/e2e meter, see section 1b). Copy it to a scratch dir and run it there; it needs NANOGPT_API_KEY in the environment.

Pitfalls

  • Reasoning deltas hide in a separate field. Reasoning-capable providers stream thinking as delta.reasoning_content, not delta.content. Parse both and concatenate — a delta.content-only parser records empty answers and reports null TTFT for models that are actually working.
  • Server-side buffering makes per-chunk tok/s meaningless. Some providers flush the stream in large bursts (apparent 7,000-25,000 tok/s peaks); compute effective throughput as usage completion_tokens / total elapsed, never from chunk timing.
  • Null TTFT on a reasoning model usually means field mismatch or cap starvation, not a broken endpoint — check reasoning_content first, then the token budget.
  • Vultr Serverless Inference (api.vultrinference.com/v1, OpenAI-compatible, also /v1/messages Anthropic-shaped): flash-tier models run ~$0.10-0.15 input / $0.20-0.60 output per 1M; prefill is fast (30-40K tok/s class, 140K-token doc answered in 2-4s); 120 req/min with 16 concurrent per model (glm-5.2/5.3 tighter at 30 req/min); no disclosed energy sourcing, so flag the green-routing preference when recommending it. Same model can be 2-4x faster there than via OpenRouter default routing.
  • Do not report self-published marketing numbers as gospel — cross-check with Artificial Analysis or DeepInfra.
  • Reasoning models inflate TTFT because thinking tokens stream before the answer. Clarify whether the cited TTFT includes reasoning time.
  • Provider != Model: A model can be 200 t/s on Groq and 27 t/s on Novita. Always name the provider.
  • Masked keys: If an API key is redacted in config, move on to web research immediately.
  • Report first-content-token TTFT, not first-byte TTFT — routed models can hold the stream open seconds before any visible text lands.
  • Bench the model in use AND the configured default — they diverge silently when a UI picker overrides config.
  • Cost sanity check: if the billed provider shows $0.00 / cost_status unknown (custom billing provider), say so in the report instead of implying the run was free.
← v1.0.0All versions