bench.zh

bench.zh is a command for coding agents from druide67/asiai. It costs 33 tokens per session (1,745 once invoked), scanned B, original, Apache-2.0.

A benchmark command for measuring how language models run on Apple Silicon Macs. A benchmark is a repeatable test used to compare speed, response time and power use.

In plain words
What is it for?
Use it to compare engines or 2–8 models, measure tokens per second, time to first response, power and thermal data, review history, export JSON, or share results.
Why use it?
It replaces guesswork when choosing between model engines or models by recording comparable measurements in one run.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/druide67/asiai/bench.zh
Clone the repo
git clone --depth 1 https://github.com/druide67/asiai

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bench.zh

README.md
[![agentmods](https://agentmods.dev/badge/commands/druide67/asiai/bench.zh.svg)](https://agentmods.dev/commands/druide67/asiai/bench.zh)
Your own site
<a href="https://agentmods.dev/commands/druide67/asiai/bench.zh"><img src="https://agentmods.dev/badge/commands/druide67/asiai/bench.zh.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.01745
Opus 5 $0.00016 $0.00873
Sonnet 5 $0.00007 $0.00349
Haiku 4.5 $0.00003 $0.00175

Measured 5d ago against content hash a86c2e1000d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

bench.zh scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `--power` | 使用 sudo powermetrics 交叉验证功耗(IOReport 始终开启) |
docs/commands/bench.zh.md · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.

asiai bench

使用标准化提示词进行跨引擎基准测试。

用法

asiai bench [options]

选项

选项 描述
-m, --model MODEL 基准测试的模型(默认:自动检测)
-e, --engines LIST 筛选引擎(如 ollama,lmstudio,mlxlm
-p, --prompts LIST 提示词类型:codetool_callreasoninglong_gen
-r, --runs N 每提示词运行次数(默认:3,用于中位数 + 标准差)
--power 使用 sudo powermetrics 交叉验证功耗(IOReport 始终开启)
--context-size SIZE 上下文填充提示词:4k16k32k64k
--export FILE 导出结果到 JSON 文件
-H, --history PERIOD 显示历史基准测试(如 7d24h
-Q, --quick 快速基准测试:1 个提示词(code),1 次运行(约 15 秒)
--compare MODEL [MODEL...] 跨模型比较(2-8 个模型,与 -m 互斥)
--card 生成可分享的基准测试卡片(本地 SVG,配合 --share 生成 PNG)
--share 将结果分享到社区基准测试数据库

示例

asiai bench -m qwen3.5 --runs 3 --power
  Mac Mini M4 Pro — Apple M4 Pro  RAM: 64.0 GB (42% used)  Pressure: normal

Benchmark: qwen3.5

  Engine       tok/s (±stddev)    Tokens   Duration     TTFT       VRAM    Thermal
  ────────── ───────────────── ───────── ────────── ──────── ────────── ──────────
  lmstudio    72.6 ± 0.0 (stable)   435    6.20s    0.28s        —    nominal
  ollama      30.4 ± 0.1 (stable)   448   15.28s    0.25s   26.0 GB   nominal

  Winner: lmstudio (2.4x faster)
  Power: lmstudio 13.2W (5.52 tok/s/W) — ollama 16.0W (1.89 tok/s/W)

提示词

四种标准化提示词测试不同的生成模式:

名称 Token 数 测试内容
code 512 结构化代码生成(Python BST)
tool_call 256 JSON 函数调用 / 指令跟随
reasoning 384 多步数学问题
long_gen 1024 持续吞吐量(bash 脚本)

使用 --context-size 测试大上下文填充提示词。

跨引擎模型匹配

运行器自动跨引擎解析模型名——gemma2:9b(Ollama)和 gemma-2-9b(LM Studio)被识别为同一模型。

JSON 导出

导出结果用于分享或分析:

asiai bench -m qwen3.5 --export bench.json

JSON 包含机器元数据、按引擎统计(中位数、95% 置信区间、P50/P90/P99)、原始每次运行数据和 schema 版本。

回归检测

每次基准测试后,asiai 将结果与过去 7 天的历史比较,对性能回归发出警告(如引擎更新或 macOS 升级后)。

快速基准测试

运行单提示词单次运行的快速基准测试(约 15 秒):

asiai bench --quick
asiai bench -Q -m qwen3.5

Read the full file on GitHub · 164 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 164 lines · 33 tokens per session scan B a86c2e1000d9

Subscribe to this mod's changes

bench.zh is a command published in the GitHub repository druide67/asiai (11 stars, last pushed 6d ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,745 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.