读见

艾哈迈德·奥斯曼谈本地 AI 生产实践:为工作负载选模型和硬件

原题What Runs Where? Local AI in Production — Ahmad Osman, Osmantic

约 14 分钟原文英文已翻译

视频由 YouTube 提供

推荐理由Ahmad Osman 对比本地部署的预填充、解码和工具等待,帮助你按任务瓶颈选模型、设备与推理引擎。

看前速览

3 个要点

奥斯曼用本地游戏、智能体做预告片和跨设备测试说明,推理表现取决于任务、模型、引擎与芯片如何配合。

  1. 测量整个请求链路

    预填充、解码、批处理和外部工具的瓶颈各不相同。50 路并发测试和分词器提速的例子都说明,端到端指标更贴近实际体验。

  2. 把完成任务所需的工具给本地模型

    本地模型原本无法更改显卡灯效,获得搜索能力后才完成。游戏和预告片也依赖推理框架、硬件及模型之间的配合。

  3. 按预期部署场景做取舍

    用真实任务轨迹评估专用模型,比较设备租用和自持的成本,为更强模型留出余量。记忆印迹和权重编辑是讲者提出的持续学习探索方向。

完整摘要

Osmantic 创始人先演示在 RTX Spark 上本地制作的游戏和由智能体协助剪出的预告片,再比较长提示预填充、解码和 50 路并发请求对设备的要求。RTX Pro 6000 在演示的批量测试中领先,而单独大幅提速的分词器对请求总耗时影响有限。本地智能体原本改不了显卡灯效,接入搜索后完成了任务,说明问题也可能出在外部工具。奥斯曼主张用真实任务轨迹评估专用模型、按利用率选择租用或购买设备,并尝试把记忆印迹、决策模型和权重编辑结合起来探索持续学习。

章节

文字稿

查看原文

简要描述Brief Description

Ahmad Osman 通过基准测试、硬件对比和团队项目,介绍了如何在生产环境中进行本地推理,并解释了为什么合适的模型和推理引擎取决于芯片和工作流程。最后,他提出了在本地系统上实现持续学习的方案。Ahmad Osman walks through local inference in production, using benchmarks, hardware comparisons and his team's projects to explain why the right model and engine depend on the chip and workflow. He closes with a proposal for continual learning on local systems.

目录Table of Contents

  • 各环节在哪里运行:生产环境中的本地 AI
    What runs where: local AI in production
  • 基准测试、智能体工作负载与专用模型
    Benchmarks, agent workloads and specialized models
  • 智能体制作的预告片与 Portal 测试框架
    An agent-made trailer and the Portal harness
  • 量化与模型质量
    Quantization and model quality
  • 预填充、解码与硬件选择
    Prefill, decode and choosing hardware
  • 每个芯片的批处理与推理引擎
    Batching and inference engines per chip
  • 流水线优化与推测解码
    Pipeline optimization and speculative decoding
  • 为什么本地智能体需要搜索功能和完整的执行框架
    Why local agents need search and a complete harness
  • 根据真实任务轨迹选择专用模型
    Choosing specialized models from real task traces
  • 租用 GPU:成本与运维方面的权衡
    Renting GPUs, costs and operational tradeoffs
  • 在现有硬件上规划更强大的模型
    Planning for more capable models on existing hardware
  • 为什么持续学习需要本地 AI
    Why continual learning needs local AI
  • 记忆印迹、决策模型与权重编辑
    Engrams, decision models and weight edits

各部分在哪里运行:生产环境中的本地 AIWhat runs where: local AI in production

我有 170 张幻灯片。我们讲不完全部内容,但我会把它们发出来。我想回顾到 2023 年,看看本地 AI 发展到什么阶段,并谈谈它的未来走向。6 月,我们在 AI Engineer World's Fair 上与 NVIDIA 联合举办了一场本地 AI 峰会。我当时说,我们正处于 Linux 的 90 年代。越来越多的人开始投资这个生态系统和基础设施。我们看到了巨型内核、新的推理引擎,以及针对每个模型、每款芯片和每种工作流进行优化的尝试。I have 170 slides. We will not get through all of them, but I'll post them. I want to go back to 2023, look at where local AI is now and talk about where it is going. In June we hosted a local AI summit with NVIDIA at the AI Engineer World's Fair. I said we were in the '90s of Linux. More people are beginning to invest in the ecosystem and infrastructure. We are seeing megakernels, new inference engines and people optimizing per model, per chip and per workflow.

开源 AI 是一个优化问题。本地 AI 是一个用户体验问题。两者都需要并行解决。Open-source AI is an optimization problem. Local AI is a user experience problem. Both need to be solved in parallel.

在最近一次与 NVIDIA 共同举办的发布活动上,我们为 RTX Spark 构建了一款优化后的推理引擎。我展示的这款游戏是在运行 Windows 的 RTX Spark 上制作的。智能体通过我们自己的 Portal 测试框架在本地运行。你可以试玩这款游戏并查看跟踪记录。在 Best Buy 的发布活动上,有人走上前来试玩这款游戏。这表明,我们常规圈子以外的人也对本地运行能实现什么感兴趣。At a recent launch with NVIDIA, we built an optimized inference engine for RTX Spark. The game I'm showing was made on an RTX Spark running Windows. The agent worked locally with our own Portal harness. You can play the game and inspect the traces. At the Best Buy launch, people came up to play the game. It was a sign that people outside our usual circle are interested in what can be done locally.

你能分辨出这两个回答有什么不同吗?一个来自本地模型,另一个来自 GPT-5.5。在我们与 Hugging Face 合作的视频中,我们在不同的机器上进行了演示。两个回答很相似。在那次测试中,本地的 270 亿参数 Qwen 模型以每秒 51 个 token 的速度解码,而云端响应的速度是每秒 34 个 token。这只是比较中的一个例子,所涉及的工作流中,工具和响应速度都很重要。Can you tell the difference between these two answers? One came from a local model and one from GPT-5.5. In our video with Hugging Face we ran demos on different machines. The answers were similar. The local 27-billion-parameter Qwen model was decoding at 51 tokens per second in that test, against 34 for the cloud response. That is one example from a comparison, on a workflow where the tools and response speed mattered.

基准测试、智能体工作负载与专用模型Benchmarks, agent workloads and specialized models

Artificial Analysis 在其最新指数中将 Haiku 5.5 排在 DeepSeek V4.1 Flash 之前。我怀疑这一结果是否也适用于我做的工作。另一张图表展示了自 2023 年 3 月以来,机器能够完成的人类任务时长如何增长。图表中的任务时长大约每四个月翻一番,我看不出这种增长势头有放缓的迹象。OpenRouter 2026 年 10 月的一张图表显示,代币数量已达数万亿;自 2026 年 2 月以来,智能体生成的代币数量超过了人类。将会有更多智能体为其他智能体生成代币。Artificial Analysis ranked Haiku 5.5 ahead of DeepSeek V4.1 Flash in its new index. I question whether that result carries over to the work I do. Another chart looks at how the duration of human tasks machines can solve has grown since March 2023. The task horizon is roughly doubling every four months in that chart and I do not see that slowing. An October 2026 OpenRouter chart shows trillions of tokens, with agents generating more than people since February 2026. More agents are going to produce tokens for other agents.

此前的一张 Artificial Analysis 指数图表显示,开放模型的得分从 2025 年 1 月的 13 分升至 51 分。测得的差距正在缩小。但换一个基准测试,情况就不同了。HLE Diamond 显示差距超过 50%,而在我展示的对比中,开放模型在 Terminal Bench 上领先两分。你该相信哪个基准测试?我不再默认每次新模型发布都会改变我自己的工作。我上次积极使用的 Gemini 版本,是 3 月 25 日发布的 2.5 Pro。An earlier Artificial Analysis index chart showed open models going from 13 points in January 2025 to 51. The measured gap is narrowing. But a different benchmark changes the story. HLE Diamond shows a gap of more than 50%, while Terminal Bench has open models ahead by two points in the comparison I am showing. Which benchmark should you trust? I stopped assuming every new model release changes my own work. The last Gemini release I used actively was the March 25 edition of 2.5 Pro.

我在 2025 年 3 月写道,未来属于小型、专用模型。我预计,三年内,一个十亿参数模型就能在某些任务上胜过 Opus 5.5。有张图表显示,尽管消耗的大多数 token 来自开放模型,但大部分支出都流向了闭源模型。在我引用的 OpenRouter 图表中,按 token 用量计算,DeepSeek V4.1 Flash 是广泛使用的模型之一;而按支出金额计算,Opus 则位居前列。I wrote in March 2025 that the future is small and specialized models. Within three years, I expect a one-billion-parameter model to beat Opus 5.5 on some work. One chart has most spending going to closed models even though most consumed tokens are from open models. In the OpenRouter chart I am citing, DeepSeek V4.1 Flash is among the models widely used by token volume, while Opus leads in money spent.

这对芯片很重要。智能体任务中,很多时间都花在等待 shell 命令或其他工具运行并返回结果上。解码速度只是其中一个方面。当处理速度和工具延迟成为瓶颈时,哪怕只有一张 RTX 3090 也能派上用场。This matters for chips. A lot of time in an agentic task goes to waiting for a shell command or another tool and getting the result back. Decode speed is only one part. Even a single RTX 3090 can be useful when processing and tool latency are the bottlenecks.

一家安全供应商在 4 月开展的研究,是另一个例子,说明规模较小的专用模型也能发现一些相同的安全漏洞。价格和通用智能并不能说明模型在某项任务上的表现有多好。有些模型经过了大量强化训练,专门用于编程。我可能会信任其中一个模型,让它以更少的杂音执行任务并编写优质代码,同时依靠另一个模型解决其能力范围之外的难题。A security vendor's research in April is another example of smaller specialized models finding some of the same security gaps. Price and general intelligence do not tell you how good a model is on a task. Some models are reinforced extensively for coding. I may trust one to execute and write good code with less noise while relying on another to work through hard problems outside that range.

我是 Ahmad Osman,Osmantic 的创始人兼 CEO。曾经有人问我,我的姓氏是不是代表“开源人”,于是我就顺势把这个说法用上了。公司的核心理念是,你不需要在每个环节都用前沿智能。即便是 Opus,与其他任务中你可能会选择的更昂贵模型相比,也可能显得像个小型专家模型。I'm Ahmad Osman, founder and CEO of Osmantic. Someone once asked if my last name stood for open-source man and I ran with it. The company's thesis is that you do not need frontier intelligence at every step. Even Opus can look like a small specialist compared with the more expensive models you might pick for other tasks.

智能体制作的预告片与 Portal 测试框架An agent-made trailer and the Portal harness

我让一个智能体参考我的视频和文章,为这场演讲制作预告片。它找出了引言和片段,挑选音乐,并安排了屏幕文字和叠加内容。我反馈哪些内容该用、哪些该删。它用两张 RTX Pro 6000 为照片打标签、缩放媒体,而我的 MacBook 则负责剪辑和在不同版本之间做选择。我晚上 9 点左右开始,凌晨 3 点完成。六个小时就完成了这项以前我会花钱请人做的工作。我预计,几年后,一位小型专业团队成员就能在家完成这项工作。I pointed an agent at my videos and articles and asked it to build the trailer for this talk. It found quotes and clips, chose music and arranged the on-screen text and overlays. I gave feedback on what to use and what to drop. It used two RTX Pro 6000s to tag photos and scale media, while my MacBook handled editing and choosing between versions. I started around 9 p.m. and finished at 3 a.m. That's six hours to do a job I would previously have hired someone to do. I expect a small specialist to be able to do it at home in a few years.

我们构建了一个名为 Portal 的运行框架,并给它加上了云朵标志,因为现在你可以在家里拥有云。它的代号是 Cairo,那是我的家乡。无论你用的是桌子底下的机器,还是某家数据中心里的机器,计算资源对某个人来说都是本地的。如果你告诉我,你需要云是因为需要前沿智能,我想知道你指的是哪项任务、哪个基准测试。We built a harness called Portal and gave it a cloud symbol because you can now have the cloud at home. Its code name is Cairo, where I'm from. Whether you use the machine under your desk or someone's data center, the compute is local to somebody. If you tell me you need the cloud because you need frontier intelligence, I want to know which task and which benchmark you mean.

长上下文仍然让内存成为一个实实在在的问题。这张照片里,我身后有十四张 RTX 3090。我直播了六个小时,尝试用 DDR4 内存运行拥有 6710 亿参数的 DeepSeek R1。它的速度大约是每秒八个 token,运行到约 16,000 个 token 时速度就慢了下来。尽管如此,我还是亲眼看着一个推理模型在自己的机器上运行。几个月后,拥有 1200 亿参数的 GPT-OSS 模型问世,一个小得多的模型也能完成更多工作。到 2025 年初,我还用单张 RTX 显卡搭建了一个本地截图整理工具。只要在这些模型背后投入一些系统工程,它们就已经很实用了。Long context still makes memory a real problem. Behind me in this photo are fourteen RTX 3090s. I streamed for six hours while trying to get the 671-billion-parameter DeepSeek R1 running with DDR4 memory. It was giving me roughly eight tokens per second, and slowed once it hit about 16,000 tokens. Still, I was watching a reasoning model run on my own machine. Months later a 120-billion-parameter GPT-OSS model came out and a much smaller model could do more of the work. By early 2025 I had also built a local screenshot organizer on a single RTX card. The models were already useful if you put some systems engineering behind them.

量化与模型质量Quantization and model quality

量化技术正在不断改进,包括围绕 NVFP4 以及 NVIDIA 为 RTX Pro 6000 开发的引擎所开展的工作。这款工作站显卡中的 Blackwell,与 B200 和 B300 数据中心硬件中的 Blackwell 有所不同。面向专业消费级硬件的引擎可以将这一点考虑在内。Quantization is improving, including work around NVFP4 and NVIDIA's engine for the RTX Pro 6000. Blackwell in that workstation card differs from Blackwell in B200 and B300 data-center hardware. Engines for prosumer hardware can take that into account.

量化感知训练让模型能够在训练过程中进行适应。动态量化同样会区别对待模型的不同部分。有些选择是在运行时做出的,另一些则基于运行基准测试并分析哪些层比较重要。你可以让一部分保持 16 位,另一部分采用 8 位,而很少使用的部分则可以进一步降低位数。对所有部分都采用 4 位量化,可能会抹去你需要的能力。不同的量化方式不能互换。请留意哪些层会损失精度。Quantization-aware training lets the model adapt as it is trained. Dynamic quantization likewise treats different parts of the model differently. Some choices happen at run time, and others come from running benchmarks and looking at which layers matter. You might keep one part at 16 bits and another at eight, while a rarely used part can go much lower. Applying four bits to everything can wipe out capabilities you need. Quantizations are not interchangeable. Pay attention to which layers lose precision.

我展示的一项对比中,四位量化的 GLM 5.3 在测试的准确率指标上保留了约 94%,而较早的 DeepSeek V3.1 示例则保留了约 76%。这两者是不同的模型和对比,但重点在于,随着量化方法不断改进,我们可以在内存更少的机器上保留更多能力。One comparison I showed had four-bit GLM 5.3 retaining about 94% on the tested accuracy measure, while an earlier DeepSeek V3.1 example retained about 76%. These are different models and comparisons, but the point is that as quantization methods improve, we can retain more capability on a machine with less memory.

预填充、解码与硬件选择Prefill, decode and choosing hardware

Prefill 受计算能力限制,而 decode 主要受内存带宽限制。提示词越长,生成第一个 token 前需要完成的工作越多。提示词越短,越快开始生成 token。在更长的上下文中构建 KV cache,与在一个批次中服务大量请求,带来的瓶颈并不相同。应根据实际运行的工作流选择硬件。Prefill is compute-bound and decode is largely memory-bandwidth-bound. A long prompt takes more work before the first token. A short prompt starts producing tokens sooner. Building the KV cache at longer context and serving many requests in a batch do not create identical bottlenecks. Choose hardware for the workflow you will actually run.

一个密集型的 270 亿参数模型会在处理每个 token 时使用全部权重。参数量较少的混合专家模型在 DGX Spark 上的表现则有所不同。如今,手机已经能够运行一些模型;在我看来,它们在某些任务上的能力甚至超过了几年前还需要数据中心才能运行的模型。因此,我预计 10 亿和 20 亿参数的模型会变得普遍,围绕它们进行编排,也可能由另一个模型来负责路由。A dense 27-billion-parameter model uses all its weights for each token. A mixture-of-experts model with fewer active parameters behaves differently on a DGX Spark. A phone can now run models that I consider more capable on some tasks than a model that required a data center a few years ago. That is why I expect one- and two-billion-parameter models to become common, with orchestration around them and possibly another model doing the routing.

仅看内存带宽数据可能会产生误导。我展示过一项对比:两台 DGX Spark 的表现胜过一套标称带宽高得多的 Mac 配置。平台上的软件优化也是造成差异的原因之一。在我运行的许多工作流中,CUDA 都更胜一筹。对于愿意花更多时间让它正常运行的人来说,英特尔 GPU 可能更合适。你愿意花多少时间进行调优,也是购买决策的一部分。Memory bandwidth figures alone can be misleading. I showed a comparison in which two DGX Sparks beat a Mac configuration that had a much higher headline bandwidth figure. Software optimization on the platform was part of the difference. CUDA is ahead in many of the workflows I run. An Intel GPU may suit somebody prepared to spend more time making it work. How much time you want to spend tuning is part of the buying decision.

在 Hugging Face 演示中,我们在 RTX Pro 6000、M5 Max MacBook Pro、DGX Spark 和 Strix Halo 机器上运行了同一个模型。视频展示了它们开始生成 token 时各自不同的速率。在这项解码速度对比中,RTX Pro 6000 领先。In the Hugging Face demo we ran the same model on an RTX Pro 6000, an M5 Max MacBook Pro, a DGX Spark and a Strix Halo machine. The video shows the different rates as each starts generating tokens. The RTX Pro 6000 led that decode comparison.

每芯片的批处理与推理引擎Batching and inference engines per chip

我们让每台机器同时处理 50 个请求。在演示中,RTX Pro 6000 的速度接近每秒 1,300 个 token,而其他配置实际上都在顺序处理。这也是一个软件问题。请针对你使用的平台和模型构建引擎,并向 ODS 提交 pull request。我们可以将适用于这些特定目标的优化设为默认配置。We ran 50 requests per machine at once. The RTX Pro 6000 reached almost 1,300 tokens per second in the demonstration, while the other setups were effectively sequential. That is a software problem as well. Build an engine for the platform and models you use and open a pull request to ODS. We can make working optimizations the default for those specific targets.

通用型引擎支持多种硬件,包括小型开发板,但它做出的取舍与围绕单一平台构建的引擎不同。随着智能体开始并行启动更多智能体,请求的构成也会发生变化。对于这类工作,GPU 可能比 Mac 更合适,除非 Mac 上有更适合该任务的引擎。A general-purpose engine supports a wide range of hardware, including small boards, but makes different tradeoffs from an engine built around one platform. As agents start more agents in parallel, the request mix changes. A GPU can make sense over a Mac for that work unless the Mac has a better engine for the job.

推理引擎、量化方式和权重格式各不相同。我们有自己的 ODS 权重。与其急着就单一标准达成一致,我更倾向于先寻找实用的优化方案。接下来一年到一年半里我们构建的很多东西,可能最终都会被弃用。工程师可以在参数量不到十亿的模型上尝试小型内核,看看性能极限在哪里。OpenRouter 的 GLM 对比展示了推理引擎和芯片的重要性。其中有些引擎是闭源的,或者无法使用;而硬件指令集的差异,也意味着不同平台无法用相同的方式解包、移动或计算数据。There are different engines, quantizations and weight formats. We have our own ODS weights. I would worry less about agreeing on a single standard immediately and more about finding useful optimizations. Much of what we build in the next year or year and a half may be thrown out. Engineers can try tiny kernels on a sub-billion-parameter model and see where the limits are. OpenRouter's GLM comparison illustrates how much engines and chips matter. Some engines in it are closed or unavailable, and the hardware instruction sets do not let every platform unpack, move or calculate on data the same way.

流水线优化与推测解码Pipeline optimization and speculative decoding

在你自己的硬件上测量首个 token 的生成时间、每位用户或代理的每秒 token 数、每秒请求数和任务准确率。你不能只相信别人的方案或基准测试。我之前讨论过的一个分词器,单独运行时速度快了约 100 倍,但整个请求的性能只提升了约 1.1%。这仍然可能是很好的工程优化,只是说明了流水线中还有多少其他部分也在使用机器资源。Measure time to first token, tokens per second per user or agent, requests per second and task accuracy on your own hardware. You cannot just trust somebody else's recipe or benchmark. A tokenizer I discussed ran about 100 times faster in isolation, but the whole request gained about 1.1%. That can still be good engineering. It just shows how many other parts of the pipeline use the machine.

整个夏天,大家针对不同模型、AMD 和 NVIDIA 硬件,以及添加了 DFlash 等方法支持的 llama.cpp 分支,进行了投机解码实验。11 月 9 日发布的一篇预印本因其调度方面的工作而引人注目。我的介绍目前还只是初步的,如有需要,我会发布更正。它会保留轮次结束位置的信息,以改进调度。我展示的结果显示,根据模型不同,吞吐量约提升了 1.5 到 3.14 倍。这类优化正是人们在 6 月开始尝试的,如今尝试的人更多了。Over the summer there were speculative decoding experiments for different models, AMD and NVIDIA hardware, and forks of llama.cpp adding support for approaches such as DFlash. A November 9 preprint stood out for its scheduling work. My account is preliminary and I will post corrections if I need to. It retains information about where turns end to improve scheduling. The results I showed ranged from about 1.5 to 3.14 times throughput depending on the model. That is the kind of optimization people were beginning to try in June, and more are doing it now.

ODS 旨在为你的模型和平台选择最合适的推理引擎。不同场景下使用的引擎不必相同。人们想要的是能用的东西,其中也包括那些不想阅读推理引擎相关文章的人。DeepSeek 发布的成果(例如 Engram 表)也是开源社区可以借鉴的有价值研究的又一例子。还有一些较新的工作也值得关注。ODS aims to choose the best inference engine available for your model and platform. It does not have to be the same engine everywhere. People want something that works, including people who do not want to read articles about inference engines. DeepSeek's release of work such as engram tables is another example of valuable research the open community can build on. There are more recent efforts to follow as well.

为什么本地智能体需要搜索功能和完整的运行框架Why local agents need search and a complete harness

一位朋友买了一块 5090 显卡,并将一个 270 亿参数的 Qwen 模型接入 Claude Code。他让它更改显卡风扇的 RGB 颜色。Opus 之前已经完成过这项任务,但本地模型做不到。我问他有没有给本地模型提供搜索引擎。Claude Code 可以查找模型训练完成后才出现的工具的相关信息。朋友让本地环境能够使用搜索功能后,又重复了同一项任务,这次模型成功更改了 RGB 颜色。A friend bought a 5090 and connected a 27-billion-parameter Qwen model to Claude Code. He asked it to change the RGB colors on the GPU fans. Opus had done it before, but the local model could not. I asked whether he had given the local model a search engine. Claude Code can find information about tools that appeared after the model was trained. When my friend gave the local setup access to search and repeated the same task, it changed the RGB colors.

如果模型是在某种设备或工具出现之前训练的,就需要获取最新的使用说明。否则,基础设施的缺失会让人觉得是模型不够好,于是就不会再尝试本地 AI。ODS 内置了搜索功能。过去我不建议人们为了体验本地 AI 而购买 Apple 硬件,因为我担心他们会被最初的软件体验劝退。软件本身以及围绕它传递的信息都很重要。If the model was trained before a device or tool existed, it needs access to current instructions. Otherwise a missing piece of infrastructure feels like a bad model and people do not try local AI again. ODS includes search. I used to discourage people from buying Apple hardware just to get into local AI when I thought the initial software experience would drive them away. The software and the message around it matter.

我提到过一篇论文 EXO,它展示了如何围绕重复执行的工作搭建可复用的工程框架,从而随着时间推移节省 token。在我看来,这就是朴素的系统工程。通过围绕本地模型和云端模型的实际表现进行构建,我们还能从中挖掘出更多价值。A paper I mentioned, EXO, showed a harness building reusable engineering around the work it did repeatedly, saving tokens over time. I see that as straightforward systems engineering. There is more value to extract from local and cloud models by building around what they actually do.

根据真实任务轨迹选择专用模型Choosing specialized models from real task traces

OpenRouter 的数据显示,大约三分之一的通用编程用户更换了模型,而翻译和摘要用户往往倾向于继续使用原来的模型。推出新模型时,不妨试试。就我的工作而言,即使通用排行榜更青睐 Haiku,我也会给 DeepSeek V4.1 Flash 一个机会。OpenRouter data showed that about a third of general coding accounts changed their models, while translation and summarization users tended to stick. Be willing to try a different model when something new comes out. For my work, I would give DeepSeek V4.1 Flash a chance even if a general index favors Haiku.

Airbnb 报告称,在一项特定任务上,使用一个拥有 20 亿参数的模型,达到相当的质量水平,成本约为原来的 1%。从你自己的智能体生成的轨迹入手,包括使用前沿模型生成的轨迹,并用它们构建评测。如果任务需要,可以使用合适的合成数据和强化学习来训练专用模型。针对芯片、模型和工作流进行优化,才能节省成本。这是 Airbnb 的案例,并不代表普遍适用的成本比例。Airbnb reported comparable quality for a particular task at about 1% of the cost with a two-billion-parameter model. Start with traces from your own agents, including those produced with frontier models. Use them to build evaluations. If the task calls for it, train a specialist with suitable synthetic data and reinforcement learning. Optimization per chip, model and workflow is where the cost saving comes from. This is Airbnb's example, not a universal cost ratio.

Fireworks 等公司托管着专用模型。教师模型可以将行为蒸馏到更小的学生模型中。我的看法是,针对常见代码任务分布调优的模型,可以非常出色地完成这些任务,但面对分布之外的新颖研究时,我不会选择它们。这是一种效率上的权衡。Companies such as Fireworks host specialist models. A teacher can distill behavior into a smaller student. My view is that models tuned for the normal distribution of coding tasks can be excellent at executing those tasks without being my choice for novel research outside that distribution. That is an efficiency tradeoff.

租用 GPU:成本与运营权衡Renting GPUs, costs and operational tradeoffs

当利用率低于某个阈值时,租用 GPU,而不是购买。对于超出自有算力的需求,或只需运行几小时的任务,可以选择租用。务必弄清楚自己实际付费购买的是什么。价格低廉的服务商可能会宣传高端型号,却把部分工作分配给更便宜的型号。依赖这类服务之前,先核实其基础设施以及实际提供的服务。Below a certain utilization threshold, rent GPUs instead of buying them. Rent for overflow or for a job that takes only a few hours. Be careful about what you are actually paying for. A cheap provider could advertise a higher-end model while routing some work to a cheaper one. Check the infrastructure and what has actually been served before relying on it.

随着质量差距缩小,开放模型和闭源模型的价格都下降了。我认为,开放竞争和研究有益于用户。每百万 token 的成本并不能代表智能水平。在一张图表中,价格低得多的 Opus 档位在网页开发任务上的表现优于一个更大的模型。基准测试分数是并列比较的一种方式。任务本身很重要。Open and closed model prices have fallen as the quality gap has narrowed. I think open competition and research benefit users. Cost per million tokens is not a proxy for intelligence. In one chart, a much cheaper Opus tier did well on web development compared with a larger model. Benchmark scores are one way to put comparisons next to each other. The task matters.

只要 GPU 还在你名下,无论它正忙还是闲置,成本都一样。Modal 提供了一个 CLI,可以按需启动 GPU。你可以自动完成申请机器、运行工作流,然后停止机器这一整套流程。但这仍然需要工程投入。我看到有些开发者委派了太多工作,以至于在向同事解释之前,还得让自己的智能体还原拉取请求中改了什么。GPUs cost the same busy or idle while you own them. Modal has a CLI that lets you bring up GPUs as needed. You can automate requesting a machine, running the workflow, then stopping it. That still takes engineering. I see developers delegating so much work that they have to ask their agent to reconstruct what changed in a pull request before explaining it to a colleague.

云服务的存在也自有其道理。拥有硬件意味着要确保依赖项正常运行、更换故障组件、规划冗余并检测故障。如果你喜欢折腾,这些事会很有趣,但任务和脚本可能会悄无声息地失败。智能体可能会忽视自己犯下的错误,直到有人要求它再次检查。我们离通用人工智能(AGI)还差得远。There is also a reason the cloud exists. Owning hardware means keeping dependencies working, replacing failing components, planning redundancy and detecting failures. It's fun if you like tinkering, but jobs and scripts can fail silently. An agent can overlook its own mistake until asked to check again. We are not at AGI just yet.

在现有硬件上规划运行能力更强的模型Planning for more capable models on existing hardware

有三件事正在发生变化:每个参数的能力更强,专业模型更多,推理引擎也更好。2023 年用于运行 Llama 2 7B 的 14 张 RTX 3090,如今也能用于较新的 Qwen 模型。购买设备时,除了考虑今天要运行的模型和工作负载,也要考虑你预计明年会运行的。加拿大有个人告诉我,现在一张 3090 要 2,700 美元。几年前,我买过几张,当时每张只花了 400 美元。Three things are changing: greater capability per parameter, more specialist models and better engines. The fourteen RTX 3090s that ran Llama 2 7B in 2023 are now useful with later Qwen models. Buy for the models and workloads you expect to run next year as well as those you run today. One person in Canada told me a 3090 now cost $2,700. I had bought some for $400 a few years earlier.

我展示了一个 3970 亿参数的混合专家模型与一个 270 亿参数的稠密模型之间的比较。该稠密模型的早期版本在这项比较中没有胜出,后续版本则胜出了。较大的模型每次约使用 170 亿个激活参数,因此每个 token 的差距远小于总参数量的差距。然而,该模型仍需要大约 15 倍的总内存。在判断哪些模型能装得下时,这些是彼此独立的数字。I showed a comparison between a 397-billion-parameter mixture-of-experts model and a 27-billion-parameter dense model. An earlier version of the dense model did not win that comparison. A later version did. The larger model used about 17 billion active parameters at a time, so the per-token difference was much smaller than the total-size difference. Yet the model still needed roughly 15 times as much total memory. These are separate numbers when you are deciding what fits.

DeepSeek V4.1 Flash 是一个例子,说明内存占用也能大幅改善,而不仅仅是吞吐量。在我们的测试中,对 KV 缓存的一项改动显著减少了长上下文所需的内存。这类提升对部署而言,可能比让分词器这样的单个组件运行得更快更为重要。DeepSeek V4.1 Flash is an example of why memory can improve dramatically, not just throughput. In our testing a change to the KV cache substantially reduced the memory needed for long context. That kind of gain can be more important to a deployment than making a single component such as a tokenizer faster.

为什么持续学习需要本地 AIWhy continual learning needs local AI

我怀疑持续学习会成为下一个重要领域。大型云服务商会针对其所有用户的整体分布进行训练,但不会围绕你的一举一动训练并托管一个专属模型。如果你想要一个能够了解你的系统,我认为就需要专门为你进行训练。目前,我们使用记忆文件以及模型周边的其他功能来近似实现这一点。I suspect continual learning will be the next big area. A large cloud provider trains for its whole user distribution. It will not train and host an individual model around everything you do. If you want a system that learns about you, I think you need training that happens for you. We currently use memory files and other features around models to approximate that.

即使智能体拥有大量上下文,也仍可能犯这样的错误:对它已有相关技能的主题,又编写新的指令。随着内容不断积累,harness 中的 Markdown 文件会变得难以使用。我认为,持续学习是解决这一问题的一条途径。更好的硬件支持也仍是其中的一部分。在六月峰会上,我们展示了一台配备 128 GB 内存的 RTX Spark Windows 机器,在 Qwen 演示中以每秒 72 个 token 的速度生成内容。这是一台可以带上飞机的机器。游戏演示展现了它的能力。An agent with a lot of context can still make the mistake of writing new instructions on a subject it already has in a skill. After enough accumulation, the Markdown files in a harness become hard to use. I think continual learning is a route past that. Better hardware support remains part of it, too. At the June summit we showed an RTX Spark Windows machine with 128 GB of memory generating at 72 tokens per second in a Qwen demo. It is a machine you can take on a flight. The game demo shows what it can do.

1月时我说,到年底,一张 RTX Pro 6000 就能运行一个达到 Opus 4.5 水平的模型。在我的比较中,一个拥有 270 亿参数的 Qwen 模型到 4 月时就已经达到这一水平。封闭式实验室有更多算力来试验智能体。在人们开发更好的方法之际,专门化是开放研究的另一条路。为你明年要运行的模型做好规划。In January I said that by year-end an RTX Pro 6000 would run a model that reached the level of Opus 4.5. In my comparison a 27-billion-parameter Qwen model was already there by April. Closed labs have more compute for experimenting with agents. Specialization is another route for open research while people develop better methods. Plan for the model you will run next year.

记忆印痕、决策模型与权重编辑Engrams, decision models and weight edits

我觉得最有意思的三项进展是印迹、决策模型和权重编辑。印迹就像 SSD 或内存中的一张地图,模型可以从中检索信息。决策模型则将分类器的理念扩展到了不同任务上。再加上权重编辑,或者我所说的先天编程,这看起来就像一套值得探索的持续学习方案。我在 11 月 4 日写过这个想法。Osmantic 正在对此进行试验。它未必是最终形态,但却是减少每个执行框架中不断堆积的 Markdown 的一种方法。The three developments I find most interesting are engrams, decision models and weight edits. An engram provides something like a map on an SSD or in memory that a model can retrieve from. Decision models extend the idea of classifiers across tasks. Add weight edits or what I called innate programming, and that looks like a recipe worth exploring for continual learning. I wrote about that idea on November 4. Osmantic is experimenting with it. It may not be the final shape, but it is one way to reduce the growing pile of Markdown inside every harness.

我们有模型内部、围绕模型以及跨实验的循环。我们也能围绕印迹和决策模型构建循环吗?其中一些方案可以在配备 SSD 或 RAM 的 CPU 上运行。在评估时,要确认你衡量的是学习,而不是奖励那些投机取巧、只为在基准测试中取得好成绩的做法。We have loops inside models, around models and across experiments. Could we build loops around engrams and decision models as well? Some of that can work on CPUs with SSDs or RAM. When you evaluate it, check that you are measuring learning rather than rewarding shortcuts to a benchmark.

我自己的配置基于我亲自收集的轨迹数据和所做的修正。数据质量和评估方案都很重要。是否应该购买 GPU,取决于你想做什么。我即将出版一本书,其中会更深入地探讨这些内容;我也会分享相关文章、演讲和视频的链接。谢谢。My own setup rests on traces and corrections I made myself. The quality of the data and the evaluation design matters. Whether you should buy a GPU depends on what you want to do. I have a book coming that goes into more of this and I will share the links to the articles, talks and videos. Thank you.

← 回到本期 · 第 6 条