> ## Content Index
> Fetch the complete content index at: https://globalfeed.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# 本地模型能快两倍吗？开源 Claude Code 技能先算上限
- URL: https://globalfeed.ai/zh/ben-di-mo-xing-neng-kuai-liang-bei-ma-kai-yuan-claude-code-ji-neng-xian-suan-shang-xian/
- Published: 2026-11-17T13:37:19.000Z
- Updated: 2026-11-17T13:37:19.000Z
- Description: Sybil Solutions 以 MIT 许可证发布的智能体技能，把本地大模型服务提速变成可测量的方法：先算理论上限，再在两次对照之间一次只改一处。在 Intel Arc B390 上，256K 输入读取速度从 297 提升到 628 token/秒。
- Author: GlobalFeed Editor
- Tags: Claude Code, 本地模型, 开源, 推理速度, dil-zh, elle

在家用显卡上运行语言模型的人都会遇到同一个问题：每秒 50 个 token 算快还是慢？还能更快，还是已经到了硬件极限？11 月 16 日晚发布在 GitHub 上的一个开源智能体技能，把这种反复试错变成了可以测量的方法。

Sybil Solutions 团队以 MIT 许可证发布了 [inference-optimisation-skill](https://github.com/sybil-solutions/inference-optimisation-skill?ref=globalfeed.ai)，截至 11 月 17 日下午获得 591 颗星。它可加载到 Claude Code 以及任何读取 SKILL.md 技能的智能体中，也提供了不用智能体时可直接使用的提示词。

## 先算上限

模型写出每个 token 时都要从内存读取大部分参数，因此生成速度（decode）通常受内存带宽限制，而读取长输入（prefill）受算力限制。技能先让智能体计算[理论上限](https://github.com/sybil-solutions/inference-optimisation-skill/blob/main/skills/inference-optimisation/references/ceilings.md?ref=globalfeed.ai)：每个 token 读取的字节数除以实测带宽。以 Intel Arc B390 笔记本为例，标称 153.6 GB/s 的内存实测 115 GB/s，Ornith-1.5-35B-A3B 每个 token 约读取 1.65 GB，不用推测解码的上限为每秒 68 个 token。团队最终达到 53，即实用上限的 55%。

## 一次只改一处

同一配置连续运行会有 5% 到 10% 的波动，团队曾在相隔一小时内测得 53.8 和 49.5。因此每次实验只改一处，按"对照、候选、对照"顺序运行，候选必须同时胜过两侧对照，且其他指标下降不超过 3%。至少取 6 个样本并记录中位数。笔记本用电池时会慢 8% 到 10%，所以测量工具在未接电源时拒绝运行。

## 按顺序尝试

技能按[实测证据](https://github.com/sybil-solutions/inference-optimisation-skill/blob/main/skills/inference-optimisation/references/levers.md?ref=globalfeed.ai)排列调优顺序：持久化编译缓存让 B390 启动时间从 113 秒降到 43 秒；GPU 图在多个系统上单独带来约两倍提速；推测解码中，把草稿模型词表裁剪到最常用的块，使 Arc Pro B70 单用户速度提升 27%。新的最佳结果必须通过长上下文检索测试，因为一次 117 token/s 的"纪录"其实是模型在循环重复列表。

## 实测结果与试用方法

B390 单用户速度从 43.6 提升到 53，四用户总速度从 84.7 到 103，256K 输入读取从 297 到 628（2.1 倍）。RTX 3090 上 Flash-Next 在 256K 上下文从 45.5 提升到 65.6。试用时先用 llama.cpp、vLLM、SGLang、LM Studio 或 Ollama 的 /v1 接口提供兼容 OpenAI 的服务，再把 `skills/inference-optimisation` 复制到 `~/.claude/skills/`，然后让 Claude Code 计算上限或开始调优。测量脚本只用 Python 标准库；队列和内存脚本依赖 bash 与 Linux 工具，Windows 上需要 WSL 之类的环境。

来源： [GitHub](https://github.com/sybil-solutions/inference-optimisation-skill?ref=globalfeed.ai), [SKILL.md](https://github.com/sybil-solutions/inference-optimisation-skill/blob/main/skills/inference-optimisation/SKILL.md?ref=globalfeed.ai), [上限计算](https://github.com/sybil-solutions/inference-optimisation-skill/blob/main/skills/inference-optimisation/references/ceilings.md?ref=globalfeed.ai)

*本文由 Claude 撰写。*