Subwave Llm Bench 标志

Subwave Llm Bench

社区热门
perminder-klair
subwave-llm-bench

使用 controller/scripts/llm-bench(矩阵测试工具)或旧版仅测试选择器的 controller/scripts/picker-test.mjs,以候选池模式和智能体模式评估并比较 SUB/WAVE 电台直播调用所用的 LLM 模型,涵盖曲目选择、节目片段、听众点播、DJ 串词、闲聊和节目流程节点。用户想要评估、基准测试、比较或测试电台应使用哪个 LLM 模型时,都使用此技能,例如“我应该用哪个模型”“对选择器/DJ/这个模型做基准测试”“测试这些模型”“<model> 适合电台使用吗”“比较 Ollama 模型”“小模型够用吗”“运行 llm-bench”“运行 picker-test”,或在排查 djAgentPick/djAgentSegment/generate* 调用缓慢或失败,且怀疑与模型选择有关时。即使用户没有提到测试工具,只要他们想评估模型的可靠性,或为 SUB/WAVE 选择模型,就应使用此技能。此技能仅负责测量和提出建议,不会更改电台当前配置的模型。

概览

发布者perminder-klair
代码仓库subwave
技能名称subwave-llm-bench
星标数
1.4K
复刻数
122
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 perminder-klair 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Subwave Llm Bench AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/perminder-klair/subwave/tree/develop/.claude/skills/subwave-llm-bench
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/perminder-klair/subwave.git /tmp/subwave
mkdir -p .claude/skills
cp -r /tmp/subwave/.claude/skills/subwave-llm-bench .claude/skills/subwave-llm-bench
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Subwave Llm Bench,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Subwave Llm Bench。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Subwave Llm Bench 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

SUB/WAVE LLM model benchmark

Two harnesses, one job: measure how well a provider + model handles the station's real LLM calls before trusting it on air.

  • llm-bench (controller/scripts/llm-bench/, npm run llm-bench) — the primary harness. A matrix runner over every on-air call kind: pool picks (pickNextTrack), agent picks (djAgentPick), pool + agent segments (generateSegment / djAgentSegment), request matching (matchRequest / djAgentRequest), the free-text scripts (intro, link, station ID, hourly), banter, and the programme family (plan, beats, exchanges). Scores reliability + deterministic rule checks, prints a per-model comparison table, writes a diffable JSON report.
  • picker-test.mjs — the legacy picker-only deep-dive. Still useful for high-iteration picker runs comparable with historical results, and it has a bundled orchestration script (see the legacy section at the end).

Both import the live prompts and schemas from src/ (never copies), fake everything external (library, tools, weather/news data), and override provider/model only inside their own short-lived process — the live controller's configured model is never touched.

The two things that surprise people

  1. Routing matters as much as the model. The same model can pass through one provider and fail through another, because each @ai-sdk/* provider translates tools / structured output differently. Canonical case: deepseek-v4-flash scored 0/4 via the deepseek direct provider but 4/4 via openrouter. Always benchmark through the routing you'll actually deploy — "is model X good?" is the wrong question; "is provider+X good?" is the right one.
  2. The stress scenarios are where truth lives. Easy cells make every model look fine. The verdict cells are: djAgentPick/long-context (full prompt + tool loop), generateSegment/dull-weather (the model must decline to air — small models botch the silence encoding; a huge wall-clock here means the structured-output retry rescued a failed first attempt), and the multi-voice JSON kinds (generateBanter, generateProgrammeExchange).

When NOT to use this

  • Changing the live model — that's an admin Settings change, not this skill.
  • Diagnosing general runtime behaviour — subwave-log-analysis.
  • Starting/stopping the stack — subwave-control.

Running llm-bench

Runs on the host from a repo clone (it imports TS source via tsx; prod containers ship only compiled dist/). The running stack is not required — keys resolve from state/secrets.env and controller/.env automatically (existing env vars win). If a key exists only inside a prod container's env, copy it out first: export OPENROUTER_API_KEY=$(docker exec sub-wave-controller printenv OPENROUTER_API_KEY).

bash
cd <repo>/controller
npm run llm-bench -- \
  --models openrouter:google/gemma-4-31b-it,ollama:qwen3:8b \
  --iterations 3

Flags:

  • --models (required) — comma list of provider:model, split on the FIRST colon, so Ollama tags keep theirs (ollama:qwen3:8b). Providers: ollama | openai-compatible | anthropic | openai | google | deepseek | openrouter | requesty | gateway.
  • --kinds — groups (pick,segment,request,scripts,banter,programme) or exact kind names. Default: all.
  • --modes — pool,agent (default both). Mode-independent kinds run once either way. If the operator runs pool mode live (Agentic picker off), --modes pool is the honest benchmark — agent cells they'll never use just add noise and cost.
  • --iterations — per scenario. 1 to smoke, 3 to screen (default), 5+ to confirm a winner. Full matrix ≈ 32 scenario cells, so ~100 calls per model at 3 iterations.
  • --out — report path (default scripts/llm-bench/reports/<ts>.json, gitignored).

A full run takes many minutes (every call is a real model call, agent cells can take 45 s each). Run it in the background with a long timeout and don't poll; OLLAMA_URL=http://localhost:11434 translates the container-internal Ollama address for host runs.

Reading llm-bench results

Each run is ok, violation (call succeeded, named rule checks failed), or thrown (bucketed: no-object-generated, timeout, unreachable, thrown). The summary prints pass% + p50 latency per cell, then per-model histograms of rule failures and thrown buckets.

Judge in this order:

  1. Thrown rate — a model that can't produce the schema at all is out. no-object-generated on structured kinds = weak structured output; everything landing at ~45 s = too slow for the loop, not incapable. unreachable = provider/config problem, not the model — fix and re-run.
  2. Violations — the named rules tell you the failure character: hallucinated-id (invents track ids — dangerous), banned-phrase:* / stage-direction:* / wrapping-quotes (would be read aloud by TTS), digits-in-spoken-time / clock-leak (hourly/link discipline), opener-repeat (ignores anti-repeat lists), unusable-exchange / single-voice (can't hold multi-voice JSON), variety:same-artist (editorial-pressure miss — informative, not disqualifying).
  3. Latency — p50 per cell; a pick has a whole track of slack so even 20 s works, but segments and links air sooner. Watch for retry-rescued cells (pass with 100×-median wall clock).
  4. Pool vs agent gap — a model that's clean in pool cells but falls apart in agent cells is a "candidate pool" model; that's a valid deployment, just say so in the recommendation.

Reports are JSON with every run record — keep old ones to diff a model across prompt changes or across model updates.

Producing the recommendation

  1. A compact table: one row per provider+model, columns for thrown rate, violation rate, p50 latency, and the dominant failure.
  2. A clear call naming the best provider + model + mode ("gemma via OpenRouter, pool mode — clean structured output, agent cells time out").
  3. Call out disqualifiers and deferrals (5xx throughout = re-test later).

Do not apply the change. The operator sets llm.provider + llm.model (and the Agentic picker toggle) in admin Settings — those are global, their call.

Legacy: picker-test.mjs deep-dive

For picker-only, high-iteration runs comparable with historical results:

bash
# DEV stack (src bind-mounted in container):
docker exec sub-wave-controller npx tsx scripts/picker-test.mjs <provider> <model> [iterations] [short|long]
# Host (works regardless of stack):
( cd <repo>/controller && STATE_DIR=<repo>/state OLLAMA_URL=http://localhost:11434 \
  npx tsx scripts/picker-test.mjs <provider> <model> [iterations] [short|long] )

long is the verdict mode (realistic session window); short is a sanity check. The bundled scripts/assess-models.sh (in this skill's directory) runs one or more models in both modes, auto-detects dev/prod, and summarises event- log failures: assess-models.sh <provider> [iterations] <model>... — with ollama and no models it discovers and tests everything installed.

Failure strings glossary (from the event log, kind: pickerTest):

  • agent did not call the done tool before stopping — model ignored the tool protocol. Check routing before rejecting the model (see surprise #1).
  • Every failure at ~agentTimeoutMs (45000) with tools=0 — a latency failure, not incapability; the deadline aborted it mid-loop.
  • Failed after N attempts … Internal Server Error — provider outage; re-run later, don't reject the model on this.
  • hallucinated-id / no-object-generated — weak structured output.

Cross-check live behaviour in /admin/debug → llm.recentCalls: the via field shows which path produced each result (ai-sdk:agent:native = clean native path; …:recovery = rescued by the done-tool recovery; a thrown djAgentPick falls back to the pool picker, so the station never goes silent).

Notes

  • Both harnesses append telemetry rows to the controller event log (state/logs/events-*.jsonl) and, if LLM_DEBUG_RAW is on, raw request bodies to state/logs/llm-debug.log. Harmless, filterable.
  • The docs page mapping every call kind to its code lives at docs/llm-calls.md; the harness design spec at docs/superpowers/specs/2026-07-09-llm-bench-design.md.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Subwave Llm Bench AI 技能有什么作用?

使用 controller/scripts/llm-bench(矩阵测试工具)或旧版仅测试选择器的 controller/scripts/picker-test.mjs,以候选池模式和智能体模式评估并比较 SUB/WAVE 电台直播调用所用的 LLM 模型,涵盖曲目选择、节目片段、听众点播、DJ 串词、闲聊和节目流程节点。用户想要评估、基准测试、比较或测试电台应使用哪个 LLM 模型时,都使用此技能,例如“我应该用哪个模型”“对选择器/DJ/这个模型做基准测试”“测试这些模型”“<model> 适合电台使用吗”“比较 Ollama 模型”“小模型够用吗”“运行 llm-bench”“运行 picker-test”,或在排查 djAgentPick/djAgentSegment/generate* 调用缓慢或失败,且怀疑与模型选择有关时。即使用户没有提到测试工具,只要他们想评估模型的可靠性,或为 SUB/WAVE 选择模型,就应使用此技能。此技能仅负责测量和提出建议,不会更改电台当前配置的模型。

为什么在 TypingMind 中使用 Subwave Llm Bench?

因为您只需安装一次,就能搭配任何模型使用。Subwave Llm Bench 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Subwave Llm Bench?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/perminder-klair/subwave/tree/develop/.claude/skills/subwave-llm-bench。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Subwave Llm Bench?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Subwave Llm Bench 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Subwave Llm Bench 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Subwave Llm Bench AI 技能免费吗?

是的。perminder-klair 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇