Roger

458 posts

Roger banner
Roger

Roger

@gerrox

🤖AI hardware | On-device AI 🚀技术分享 | 产品体验 | 认知刷新 🔗公众号:Rog3r

Tham gia Şubat 2023
917 Đang theo dõi148 Người theo dõi
Tweet ghim
Roger
Roger@gerrox·
Token 度量的是 tokenizer 吐出来的字符数,而不是实际消耗的算力。 两者之间的换算关系,在 Agent 场景里会因为 KV Cache 越来越模糊。 我觉得未来的计量单位可能是: • 有效推理次数 × 模型单价,忽略缓存因素,用户买单的是结果也不是过程 • 或者干脆用总算力消耗(FLOPs),可以不用区分大小模型 尤洋教授提到的 97:3 的 Input/Output 比例继续极端化带来的结果就是 System Prompt 越来越长,但真正被计费的「生成 Token」比例越来越小。 最后 Token 总量就只是一个「虚假繁荣」的指标。
Roger tweet mediaRoger tweet mediaRoger tweet media
中文
0
1
1
424
Roger
Roger@gerrox·
回想一下 PC 软件的历史。 640KB RAM 不够用了,DOS 出了扩展内存。程序员一看够用。没过几年,4MB 不够了。16MB、64MB、256MB——每一代新增的内存,软件都会在 18-24 个月内吃得干干净净。 这是激励机制在起作用。 硬件给你更多空间,程序员就没有动力去优化。`malloc` 比 `realloc` 好用?那就多 alloc 一些。数据结构冗余一点?反正内存便宜。压缩算法太费 CPU?算了不压了,内存够用。 每一代软件工程师都在挥霍上一代人争取来的冗余。 今天的 Agent 框架正在干一模一样的事——挥霍的对象换成了 token。 后果完全不同。 软件工程师挥霍 RAM,用户多掏 200 块买条内存条。Agent 工程师挥霍 token,卖 token 的生意归零。 为什么?因为 RAM 的供给弹性很大。DRAM 扩产周期 6-12 个月,标准化程度高,用户自己买条插上就行。GPU 算力不行。芯片制造 18-24 个月。HBM 被三家厂商垄断,产能爬坡缓慢。CoWoS 先进封装产能有限。电力基础设施是硬约束,不是你想建就建。 GPU 的供给弹性比 DRAM 低一到两个数量级。 token 的底层是 GPU。挥霍 token 的成本,远比挥霍内存高。 --- 把抽象问题变成账单。 一个用户查询,在 Agent harness 里被拆成了 N 个独立 API 请求。每一条请求都携带 100K+ token 的全量上下文。同一个上下文,重复发送 N 次。 请求的数量,是 Claude Code 自家框架的「好几倍」。 换算成 API 定价,实际成本是订阅价格的几十倍。 Fuli Luo 说了一句话:「痛苦会转化为工程纪律。」 Anthropic 砍第三方订阅因为算不过账。一个用户按月付 20 刀订阅费,底层 token 消耗值 500 刀。这是做善。 问题在 Agent harness 的架构天然产生重复 token 消耗,推理层的 prefix cache 被这种请求模式完全绕过去了。 先说一下 prefix cache 到底是什么。 LLM 做推理分两步:prefill 处理输入的 prompt,decode 一个字一个字往外蹦。prefill 阶段,模型会对 prompt 里每个 token 计算一组中间结果——叫 KV cache。这些中间结果就是模型的「记忆」。下次遇到同样的 prompt,直接复用,不用重新算。 你的 prompt 里,开头那部分经常是一样的。同一个 session 里,system prompt + 工具定义 + 项目上下文,这几千甚至几万 token,在每一次请求里都相同。变化的只是最后一句用户的新问题。 推理引擎做的事:把已处理过的 prompt 前缀对应的 KV cache 存起来。新请求来了,检查它的前缀和之前缓存的前缀有没有重合。重合的部分直接复用,只计算新增的部分。 这就是 prefix cache——自动前缀缓存。 有两种主流实现。vLLM 按固定大小的 block 切分 prompt,每个 block 算一个 hash 值,新请求来了逐个比对 hash 找匹配。SGLang 用 radix tree(基数树),按 token 级别精细匹配,所有共享同一个前缀的请求都指向树里同一个节点。前者简单但粒度粗,后者更灵活但实现复杂。 命中率怎么算?能从缓存复用的 token 数除以需要处理的总 token 数。命中率 90% 意味着 100K token 里 90K 直接拿现成的,只算 10K 新内容。命中率 10% 就是 90K 全部重新算。 系统提示词的命中率高吗?理论上应该很高——它是完全重复的内容。但现实里 system prompt 经常动态变化:自动注入文件列表、git 状态、tool 定义随场景变化。哪怕只改了几个 token,如果出现在 prefix 的前面部分,整个前缀就断了。 即便 system prompt 100% 命中,它也只占 prompt 的极小比例。一个 100K token 的请求里,系统提示词可能占 5K,剩下的 95K 是对话历史和 tool results——这些全都在 miss。总体命中率 = 5K / 100K = **5%**。 这才是「数字非常难看」的真正含义。 SGLang、vLLM 这些推理引擎,花了大量工程精力把 KV cache 管理做到极致。KV cache 复用、radix attention tree、continuous batching——都是为了让你少算一遍相同的 token。 agent 框架来了,每个请求是独立的 HTTP call,上下文是全新的。引擎收到请求时看到的是一组全新的 prefix,prefix cache 全部 miss。 一个停车场,管理员设计了智能泊车系统让车位利用率最大化。每个司机把车开到门口,停一下就走,换另一辆车重来。 Chayenne 测了 cache 命中率,数字非常难看。这不是引擎的问题。是 harness 和 engine 之间的请求协议,完全没有考虑 cache 的存在。 --- 把系统里的角色摆出来看。 **第一层:卖 token 的人。** 按量计费,token 消耗越多赚越多。一个 session 用 700K token 还是 70K token,对他们来说收入差了十倍。 **第二层:做推理引擎的人。** 关心效率。prefix cache 命中率越高,GPU 利用率越高,单位 token 成本越低。但他们没有权限改 agent 框架的请求模式,只能等请求进来尽量优化。 **第三层:用户。** 订阅制下感知不到 token 成本。一次 70K 还是 700K,月底扣同一笔月费,没有动机优化上下文结构。 三层人,三种利益,互相不交叠。 没有人对总效率负责。 更精确地说:没有人**能**对总效率负责。卖 token 的没动机,做引擎的没权限,用户没感知。经典的激励不相容系统。 经济学里这是「公地悲剧」的反面——资源没被过度使用,效率被系统性浪费,每个参与者都觉得自己没错。 框架开发者觉得「我只是调用 API」,引擎开发者觉得「我只负责加速推理」,平台方觉得「用户开心就行」。 700K token 的 session,用 70K 就能干完。花了十倍的 GPU 时间、十倍的 token 消耗、十倍的等待时间。 --- Agent harness 和 inference engine 之间,存在一个谁都没管的空白层。 没有协议让框架告诉引擎:「接下来的五个请求都会复用前 80K token 的那段上下文,请帮我保持 KV cache warm。」 没有协议让引擎告诉框架:「你每次都在重新发送这段前缀,合并成一个请求,速度能快三倍。」 这个空白层不存在。 历史上每次出现这种空白层,都会有人跳出来填补。操作系统和应用软件之间没有统一的图形接口,Adobe 和 Microsoft 自己做了。数据库和应用程序之间没有 ORM 层,Ruby on Rails 和 Hibernate 自己建了。 agent harness 和 inference engine 之间,摆着同样的空白层。 谁会来定义 harness ↔ engine 的协同调度协议? 三个具体问题: 第一,context continuity。框架如何向引擎声明一段上下文的生命周期——复用多久、哪些不变、哪些增量更新。 第二,cache-aware dispatch。框架如何将一组相关请求批量调度到同一个 engine 实例,确保 prefix cache 命中。 第三,cost feedback。引擎如何将 cache 命中率、token 利用率数据反馈给框架,让框架做智能的上下文压缩和请求合并。 单个看都不是技术难题。难的是现在没有动力来做这件事。 做引擎的不知道框架的请求模式。做框架的不知道引擎的 cache 状态。用户不知道两边在做什么。 --- MiMo Token Plan 走了一条不同的路。支持第三方 harness,按 token 额度计费,不限制调用方式,按实际消耗收费。 这个模式把 token 成本暴露给了用户。用多少付多少,没有订阅制的幻觉。用户开始在意 token 消耗量,开始重构上下文结构,开始问「我能不能用 10% 的 token 干同样的事」。 当成本可见时,效率从锦上添花变成了生存问题。 订阅制本身没问题。Agent 场景下,成本不可见的订阅制会掩盖浪费。掩盖的浪费不会被优化。不被优化的浪费会撑爆单位经济模型。 Anthropic 砍第三方订阅是症状。病根是 harness 和 engine 之间的空白层。 --- GPU 供给弹性低,会让 token 浪费的代价随着时间推移越来越贵。HBM 产能、CoWoS 封装、电力基建——爬坡速度以年为单位。 agent 框架消耗 token 的速度,以天为单位。 两条线的交叉点迟早会到。到了之后,要么有人来做 harness ↔ engine 中间层,要么整个 agent 商业模式被迫重构。 谁先来定义这个协议,谁就掌握了下一代 AI 基础设施的入口。
Fuli Luo@_LuoFuli

Two days ago, Anthropic cut off third-party harnesses from using Claude subscriptions — not surprising. Three days ago, MiMo launched its Token Plan — a design I spent real time on, and what I believe is a serious attempt at getting compute allocation and agent harness development right. Putting these two things together, some thoughts: 1. Claude Code's subscription is a beautifully designed system for balanced compute allocation. My guess — it doesn't make money, possibly bleeds it, unless their API margins are 10-20x, which I doubt. I can't rigorously calculate the losses from third-party harnesses plugging in, but I've looked at OpenClaw's context management up close — it's bad. Within a single user query, it fires off rounds of low-value tool calls as separate API requests, each carrying a long context window (often >100K tokens) — wasteful even with cache hits, and in extreme cases driving up cache miss rates for other queries. The actual request count per query ends up several times higher than Claude Code's own framework. Translated to API pricing, the real cost is probably tens of times the subscription price. That's not a gap — that's a crater. 2. Third-party harnesses like OpenClaw/OpenCode can still call Claude via API — they just can't ride on subscriptions anymore. Short term, these agent users will feel the pain, costs jumping easily tens of times. But that pressure is exactly what pushes these harnesses to improve context management, maximize prompt cache hit rates to reuse processed context, cut wasteful token burn. Pain eventually converts to engineering discipline. 3. I'd urge LLM companies not to blindly race to the bottom on pricing before figuring out how to price a coding plan without hemorrhaging money. Selling tokens dirt cheap while leaving the door wide open to third-party harnesses looks nice to users, but it's a trap — the same trap Anthropic just walked out of. The deeper problem: if users burn their attention on low-quality agent harnesses, highly unstable and slow inference services, and models downgraded to cut costs, only to find they still can't get anything done — that's not a healthy cycle for user experience or retention. 4. On MiMo Token Plan — it supports third-party harnesses, billed by token quota, same logic as Claude's newly launched extra usage packages. Because what we're going for is long-term stable delivery of high-quality models and services — not getting you to impulse-pay and then abandon ship. The bigger picture: global compute capacity can't keep up with the token demand agents are creating. The real way forward isn't cheaper tokens — it's co-evolution. "More token-efficient agent harnesses" × "more powerful and efficient models." Anthropic's move, whether they intended it or not, is pushing the entire ecosystem — open source and closed source alike — in that direction. That's probably a good thing. The Agent era doesn't belong to whoever burns the most compute. It belongs to whoever uses it wisely.

中文
0
0
0
18
Roger đã retweet
Chayenne Zhao
Chayenne Zhao@GenAI_is_real·
We're Not Wasting Tokens — We're Wasting the Design Margin of the Entire Inference Stack A few days ago I read a post by Fuli Luo on Twitter, discussing Anthropic's decision to cut off third-party harnesses (OpenClaw) from using Claude subscriptions, and the design thinking behind MiMo's Token Plan pricing. Her core argument: global compute capacity is seriously falling behind the token demand created by agents. The way forward isn't selling tokens cheaper in a race to the bottom — it's the co-evolution of "more efficient agent harnesses" and "more powerful, efficient models." I read it several times over. People who build inference engines have long been frustrated by how wastefully agent frameworks burn through tokens. She articulated something the industry has tacitly acknowledged but rarely stated plainly — and she did it with precision and restraint: the compute allocation crisis we face today is not fundamentally about insufficient compute. It's about tokens being spent in the wrong places. I want to push this one layer deeper, from my own perspective. I'm a heavy user of Claude Code — I make no attempt to hide that. You can check that all the latest code in SGLang Omni was built with Claude Code powering my workflow. Its commercial success is beyond question; it genuinely gave many people (myself included) their first real experience of "coding with an agent." But I'm also an inference engine developer — my day job is figuring out how to push prefix cache hit rates higher, how to make KV cache memory layouts more efficient, how to drive down the cost of every single inference request. So when I plugged Claude Code into a local inference engine and started observing the actual request patterns it generates, my reaction was — how to put it — like a water engineer who spent months designing a conservation system, only to watch someone water their garden with a fire hose. I measured Claude Code's cache hit rate on my local serving engine over the course of a day. The numbers were painful. This isn't a case of "decent but room to improve." It's a case of "the prefix cache mechanisms we carefully engineered at the inference layer are being almost entirely defeated." Fuli Luo mentioned that OpenClaw's context management is poor — firing off multiple rounds of low-value tool calls within a single user query, each carrying over 100K tokens of context window. Frankly, Claude Code's own context management is nowhere near making proper use of prefix cache or any of the other optimizations we've built into inference engines. Many people have already noticed — for example, the resume feature has a bug that causes KV cache misses entirely, which is borderline absurd. I'll say it plainly: the way sessions construct their context was never seriously designed with cache reuse in mind from the start. Perhaps Anthropic has internal trade-offs we can't see — after all, they control both ends of the stack, model and inference, and can theoretically do optimizations at the API layer that are invisible to us. But from the external behavior I can observe, enormous volumes of tokens are being spent on: re-transmitting already-processed context, re-parsing already-confirmed tool call results, and maintaining an ever-inflating conversation history with extremely low information density. If this is merely to earn more on inference token charges, I find it genuinely regrettable. But many Claude Code users are on subscriptions — burning more tokens is fundamentally a cost burden for Anthropic, not revenue. I honestly don't understand what purpose such inefficient context management serves for Claude Code. Here's a bold hypothesis: for those long sessions that consume 700K+ tokens, there is certainly a way to restructure the session's context so it accomplishes the exact same task with 10% of the tokens. Not by sacrificing quality, but through smarter context compression, more rational prefix reuse strategies, and more precise tool call scheduling. This isn't theoretical speculation — anyone who has worked on inference engine optimization, upon seeing current agent framework request patterns, would arrive at a similar conclusion. Fuli Luo is right: global compute capacity can't keep up with the token demand agents are creating. But I'd add that a significant portion of that gap is an illusion of prosperity — artificial demand manufactured by the crude design of agent frameworks. Here's an analogy I keep coming back to. I've always liked bringing up RAM bloat — in 1969, 64KB of memory sent Apollo to the moon. In 2026, I open a single webpage and 500MB of memory usage is nothing unusual. Every generation of hardware engineers pushes memory capacity higher, and every generation of software engineers lavishly fills it to the brim. People have gotten used to this cycle, even come to see it as the normal cost of progress. But LLM inference is different. The cost of RAM bloat is your computer running a bit slower, spending a couple hundred bucks on a memory upgrade — users barely notice. The cost of token bloat is real money — GPU cluster electricity bills, user subscription fees, the industry's entire compute budget. And this cost scales exponentially as agent usage grows. If we don't establish the engineering discipline that "tokens should be used efficiently" in the early days of the agent era, the cost of catching up later, once scale kicks in, will be beyond imagination. Fuli Luo notes that Anthropic cutting off third-party harness subscription access is objectively forcing these frameworks to improve their context management. I agree with that assessment, but my gut feeling is that this shouldn't stop at "third-party frameworks need to be more frugal with tokens." It should trigger a more fundamental reflection: what kind of agent-inference co-design do we actually need? Right now, agent frameworks and inference engines are essentially fully decoupled — agent frameworks treat the inference engine as a stateless API, sending the full context with every request. Meanwhile, the inference engine does its best with prefix matching, caching whatever it can. This architecture is simple and general-purpose, but brutally inefficient for long sessions. If agent frameworks could be aware of the inference engine's cache state and proactively construct cache-friendly requests — if inference engines could understand the session semantics of agents and make smarter cache eviction decisions — once that information channel between the two opens up, the potential gains in token efficiency are enormous. Of course, maybe I'm overthinking this. Maybe the market's ultimate answer is: compute gets cheap enough, waste is fine. Just like the RAM story — in the end, everyone chose "memory is big enough, no need to optimize." But I don't think the token economy will follow the same path, at least not in the near term — because the supply elasticity of GPU compute is far lower than that of DRAM. Under compute constraints, token efficiency isn't a "nice to have" optimization — it's the core competitive advantage that determines who survives. Most people love hearing "we made the model bigger," "we stretched the context window to a million tokens," "we stacked HBM to new heights" — these narratives are sexy, shareable, fundable. But I seriously believe that "finding ways to reduce the reckless waste of tokens" is a profoundly underestimated direction. This isn't a defensive optimization. It's an offensive capability — whoever first achieves an order-of-magnitude reduction in token consumption at equivalent quality can serve ten times the users on the same compute budget, or deliver ten times the agent depth to a single user. The agent era doesn't belong to whoever burns the most compute. It belongs to whoever uses it most wisely. This line from Fuli Luo resonates deeply with me. But I want to press further: who gets to define "wisely"? The people building models? The people building inference engines? The people building agent frameworks? I think the answer is — all three must come to the table together. And right now, we're nowhere close.
Fuli Luo@_LuoFuli

Two days ago, Anthropic cut off third-party harnesses from using Claude subscriptions — not surprising. Three days ago, MiMo launched its Token Plan — a design I spent real time on, and what I believe is a serious attempt at getting compute allocation and agent harness development right. Putting these two things together, some thoughts: 1. Claude Code's subscription is a beautifully designed system for balanced compute allocation. My guess — it doesn't make money, possibly bleeds it, unless their API margins are 10-20x, which I doubt. I can't rigorously calculate the losses from third-party harnesses plugging in, but I've looked at OpenClaw's context management up close — it's bad. Within a single user query, it fires off rounds of low-value tool calls as separate API requests, each carrying a long context window (often >100K tokens) — wasteful even with cache hits, and in extreme cases driving up cache miss rates for other queries. The actual request count per query ends up several times higher than Claude Code's own framework. Translated to API pricing, the real cost is probably tens of times the subscription price. That's not a gap — that's a crater. 2. Third-party harnesses like OpenClaw/OpenCode can still call Claude via API — they just can't ride on subscriptions anymore. Short term, these agent users will feel the pain, costs jumping easily tens of times. But that pressure is exactly what pushes these harnesses to improve context management, maximize prompt cache hit rates to reuse processed context, cut wasteful token burn. Pain eventually converts to engineering discipline. 3. I'd urge LLM companies not to blindly race to the bottom on pricing before figuring out how to price a coding plan without hemorrhaging money. Selling tokens dirt cheap while leaving the door wide open to third-party harnesses looks nice to users, but it's a trap — the same trap Anthropic just walked out of. The deeper problem: if users burn their attention on low-quality agent harnesses, highly unstable and slow inference services, and models downgraded to cut costs, only to find they still can't get anything done — that's not a healthy cycle for user experience or retention. 4. On MiMo Token Plan — it supports third-party harnesses, billed by token quota, same logic as Claude's newly launched extra usage packages. Because what we're going for is long-term stable delivery of high-quality models and services — not getting you to impulse-pay and then abandon ship. The bigger picture: global compute capacity can't keep up with the token demand agents are creating. The real way forward isn't cheaper tokens — it's co-evolution. "More token-efficient agent harnesses" × "more powerful and efficient models." Anthropic's move, whether they intended it or not, is pushing the entire ecosystem — open source and closed source alike — in that direction. That's probably a good thing. The Agent era doesn't belong to whoever burns the most compute. It belongs to whoever uses it wisely.

English
8
21
118
14.2K
dontbesilent
dontbesilent@dontbesilent·
我将尽力证明:一切问题都是知识问题
中文
10
1
29
3.3K
Roger
Roger@gerrox·
怎么 Qwen 3.6 Plus 也开始学着 ChatGPT 开始落盘了。
Roger tweet media
中文
0
0
0
62
Roger
Roger@gerrox·
@Gracker_Gao 很好的思路,但是我在想有没有可能,就是需要区分场景,因此他们需要有不同的技艺,以及不同的 skills。如果这种情况下,我需要同步的就只是部分的记忆。暂时好像没有很好的解决办法。
中文
0
0
0
11
Gracker
Gracker@Gracker_Gao·
@gerrox 同步文件就可以了吧🤔 只保留主机上那个。文件的话两个电脑可以随时看。 工作电脑和 Openclaw 主机还是分开比较好
中文
1
0
1
48
Roger
Roger@gerrox·
平时自己在养的 OpenClaw,一个在主机上,一个在笔记本上。之前想的是,只要最后感觉哪个更好,那么直接复制它的 memory 和 skills,其实就能够复刻一个完整的 Agent。但是现在发现,因为使用上的不同,以及一些任务分派的不同,它们沉淀了不同的记忆,导致它们在一些能力上会有差异。可能 Agent A 干某一件事情更好,但是在另外一个任务上可能 Agent B 更擅长。因此现在有什么好的办法可以让 Agent A 和 Agent B 同步,或者说让它们能够合并起来,成为一个更加完整、更强的 Agent 吗?
中文
1
0
0
83
Roger
Roger@gerrox·
就按现在 AI 的这个发展速度,没有什么模型值得半年会员,甚至可能季度会员都没必要。之前谷歌 Gemini 才出来的时候,因为折扣,很多人觉得很划算。现在回头看,还有多少人在用 Gemini 呢?
中文
0
0
0
89
Roger
Roger@gerrox·
如何区分真知识和假知识?现在 X 上的推荐,同样一个东西被无数次地写,很多帖子看似不一样,但其实就是用 AI 重新洗了一道,真正的内核其实都没有变。就算是有信息量被重复多次,也不会有任何的增量。
中文
0
0
0
30
Roger
Roger@gerrox·
Marc Andreessen 在 a16z 办公室录 Latent Space 播客的时候,说了一句话: "Agent 的本质就是文件存储。" 紧接着他给了一个公式: **LLM + Shell + 文件系统 + Markdown + Cron + Heartbeat** Shell 诞生于 1979 年。文件系统更早。Cron job 在 Unix 很早的时候就已经存在。Markdown 是 2004 年 John Gruber 花了一个周末搞出来的。 除模型之外,每个组件我们都完全理解和掌握。 Agent 不需要神秘感。它的运作机制可以被阅读、被调试、被修改、被复制。它用的是我们用了五十年的工具,以从未有过的方式组合在一起。 --- ## 旧零件,新组合 软件行业的历史充满了「每个零件都是旧的,但组合起来创造了新范式」的故事。 浏览器是 HTTP + HTML + JavaScript 的组合。TCP/IP 协议套件里的每一个技术发明出来时都不新鲜。iPhone 是多点触控屏幕 + 移动操作系统 + App Store 的组合,没有一项是 2007 年才发明的。 Agent 的突破遵循同样的模式,但有一个根本性的差异:以前的组合解决的是功能问题,这次解决的是**自主性**问题。 Shell 给了 Agent 执行能力。文件系统给了它记忆。Markdown 给了它一种结构化但同时人类可读的存储格式。Cron 给了它时间感——不是被动响应,是到点触发。Heartbeat 给了它存在感——持续自我确认「我还活着」。 LLM 是这个组合里唯一的未知数,也是唯一的推理引擎。它让其他五个被动组件变成了主动系统。 关键在于:这个系统的状态不在代码里。在文件里。 这意味着你可以关掉 Agent,打开它的文件夹,用任何文本编辑器读完它的「脑子」——它知道什么、记得什么、计划做什么、怎么做的。你可以手动修改任何一个文件、改变它的行为、修复它的错误。 这在软件史上是第一次。 --- ## Unix 思维的回归 Marc 在播客里追溯到 OS/360。那是 IBM 在 1960 年代的大型机操作系统,一个巨型单体城堡。所有功能挤在一个臃肿的整体里,改一行代码需要重建整个系统。 Unix 的回应是:不要搞城堡。给我一个 Shell,给我一堆离散模块,让我用管道把它们串起来。每个模块只做一件事,做好一件事,然后通过标准接口和其他模块通信。 五十年后,Agent 是这个思维的延续,且走得更远。 一个 Agent 的架构本质上就是 Unix 哲学的具象化:LLM 是一个模块,可以替换;Shell 是一个模块,可以替换;文件系统是一个模块,可以替换。它们之间用文本接口通信——自然语言文本。 Marc 的判断很直接:MCP 和那些花哨的协议其实不需要。我们只需要命令行接口。 这句话在当下的 AI 基础设施争论中极其尖锐。所有人都在设计新协议、新标准、新的互操作框架。Marc 说:不需要。Bash 就够了。 Bash 已经是世界上最成熟的互操作协议。每一个软件都暴露了命令行接口。Agent 有了 Shell 访问权,它天然就和整个软件世界互通了。 --- ## 文件即状态 **你可以换掉底层 LLM,Agent 性格会变,但文件里存储的所有状态都保留着。** 换模型不换记忆。这是过去任何 AI 系统都做不到的事。ChatGPT 的记忆绑定在 OpenAI 的服务器上。Claude 的对话存在于 Anthropic 的数据库里。你无法带走它们。你无法迁移它们。你无法在本地备份它们。 文件系统状态的 Agent 可以做到。 你把整个 Agent 目录拷贝到另一台机器,加载一个不同的 LLM,它睁开眼睛,知道自己的文件在哪里,读了读自己的记忆文件,知道自己是谁、在做什么、昨天聊了什么——然后继续工作。 Marc 说的「Agent 有完整的内省能力」指的就是这个。它知道自己的文件,可以读取自己的文件,可以重写自己的文件。它能在运行中给自己添加新功能。不是比喻。是真的能。 历史上从未有广泛部署的系统拥有这种能力。 这句话需要拆开看。「自我内省」在计算机科学里不是新概念——反射、自省、元编程都有几十年历史。但它们都是代码层面的自省。一个程序能读自己的源代码,这没什么新鲜的。 Agent 的突破在于:它通过文本文件实现了**状态**的内省。状态不只是代码执行栈,而是它的信念、记忆、计划、身份。一个 Agent 读它的 memory 文件,就像一个人读自己的日记。区别在于,Agent 读完之后可以修改日记、改写记忆、给自己制定新规则——然后下次启动时,它会变成一个有微妙差异的自己。 跨模型迁移的能力更值得深想。今天用 GPT-5 跑一个 Agent,明天换成 Claude,后天换成某个开源模型。它的工具调用风格可能变了,回复语气可能变了,决策偏好可能变了。但它积累的知识文件、项目文件、配置文件都还在。 身份连续,能力可变。 这在人类历史上也没有对应物。一个最接近的类比可能是:你的大脑被换成了一个不同性格的人,但你的笔记本、日记、待办清单、通讯录全部原封不动。那个人拿起笔记本,读了读,开始接着你停下来的地方继续工作。 --- ## Computer Use 变得微不足道 Marc 提到一个现象:Computer Use 突然变得微不足道。 Agent 已经有了完整的 Shell 访问权限。给浏览器访问权,它就能操作一切。不需要专门的「computer use」接口,不需要专门的 API 封装。它直接操作操作系统,就像任何一个 Unix 用户一样。 这个视角的转换很重要。 我们一直在争论 Agent 需要什么权限、什么接口、什么安全框架。Marc 说:它已经有 Shell 了。一个有 Shell 访问权的 Agent 不需要任何额外的特权。它可以写脚本、装软件、操作文件系统、调度任务。浏览器访问权给了它 GUI 控制能力。 它已经完成了。 --- ## 软件的定义被改写了 如果 Agent 的本质是文件存储,如果它的状态在文件系统里而不是在源代码里,如果一个系统能完整理解并修改自己的运行状态——那我们对「软件」的定义就需要重写。 传统的软件是:代码定义行为,数据定义状态。代码和数据分离。用户和代码之间隔着编译器和运行时,中间的任何一层都不是用户能直接干预的。 Agent 打破了这个分层。 代码(prompt 和配置)是 Markdown 文件。数据(记忆和状态)也是 Markdown 文件。用户可以直接编辑这些文件来改变 Agent 的行为。Agent 自己也可以编辑这些文件来改变自己的行为。 软件和用户之间没有边界。软件自己就是用户,用户自己也成了软件的一部分。 Marc 说了一句很 Marc 的话:「如果我是 18 岁,我会把所有时间花在这上面。」 这不是因为他觉得 Agent 会赚大钱。a16z 已经在 Agent 基础设施上投了大量资金,他不需要为自己站台。这句话的力量在于:他看到的是范式层级的变化,和 1970 年代他看到 Unix 时一样。 他参与创造了 Web 浏览器。Web 的关键突破是什么?Marc 的答案是:假设有无限带宽的未来,押注人类可读的文本协议。View Source 功能是 Web 能爆发的核心原因——任何人都能右键点击任何网页、看到源代码、学会怎么做、做出自己的网页。 Agent 的文件系统就是新的 View Source。 任何人可以打开 Agent 的文件夹,看到它在想什么、在做什么、怎么做到的。这个透明度是 Web 爆发的核心逻辑在 AI 时代的重演。 youtube.com/watch?v=knx2wr…
YouTube video
YouTube
中文
0
1
1
132
Roger
Roger@gerrox·
这条推文底下涌现了一批产品,各自切进了 Pipeline 的不同环节。我把它们全部调研了一遍。 Obsidian Web Clipper 官方浏览器扩展(Chrome/Firefox/Edge/Safari),网页 → Markdown 的标准入口。 内建 Defuddle 引擎把 HTML 转成干净的 Markdown,保留引用和脚注。支持高亮标注、自定义模板、过滤器。所有内容以纯 Markdown 文件存储,离线可读。Obsidian 1.8.0 加入了图片本地保存功能,补齐了 Karpathy Pipeline 数据摄入的最后一块短板。 GitHub:github.com/obsidianmd/obs… 官网:obsidian.md/clipper Obsidian Karpathy Pipeline 的"操作系统"。笔记全部存在本地 Markdown 文件里,不锁定数据格式。4000+ 社区插件,双向链接、图谱视图、画板。跨平台(macOS/Windows/Linux/iOS/Android)。 免费版已经够用,商业版同步功能按需付费。 官网:obsidian.md Marp Markdown → 幻灯片的开源工具链(MIT 许可)。用 --- 分隔每一页幻灯片,支持导出 HTML/PDF/PowerPoint。提供 VS Code 扩展和 CLI 工具。 Obsidian 社区有 obsidian-marp-slides 插件,可以直接在 Obsidian 里撰写和预览 Marp 幻灯片。对应 Karpathy Pipeline 的 "Output" 环节——用 Markdown 写研究报告的同时,一键生成演示文稿。 官网:marp.app GitHub:github.com/marp-team/marp D-PC Messenger MVP 阶段的开源项目(v0.20.0,多许可证),直接回应 Karpathy 那句 "there is room here for an incredible new product"。 定位:Karpathy 的工作流是单人版,D-PC 做的是多人协作版。人类与 AI 的对话变成 "Knowledge Commits"——结构化、可验证、git 版本控制。P2P 加密通信,数据完全在本地设备上。还提出了 P2P 算力共享——可以借用朋友的 GPU 跑 LLM。 核心观点:你的知识上下文应该像 DNA 一样——可移植、可演化、完全由你控制。 10-20 年后,当 AI 助手和脑机接口普及,你积累的 "Knowledge DNA" 将决定你在 AI 增强社会中的认知能力。 这个项目的野心比"知识库协作"大得多。 GitHub:github.com/mikhashev/dpc-… OriginTrail DKG V10 区块链 + 知识图谱的结合体。它要解决的是 Karpathy Pipeline 最明显的短板:本地、不可验证、数据孤岛。 DKG(Decentralized Knowledge Graph)把知识资产锚定在多链上,形成可验证、不可篡改的全局知识图谱。V10 版本引入了 multi-agent memory(多智能体记忆)、agent-native payments(原生代理支付)、context oracle(上下文预言机)。 在 DKG 的架构里,Karpathy 的 Wiki 只是每个 Agent 的 Working Memory——局部的、临时的。DKG 往上加三层:Shared Working Memory(协作暂存区)、Long-term Memory(链上永久记录)、Verified Memory(多方签名背书)。 这解决的是多 Agent 协作中的知识可信度问题,个人笔记用不上。 官网:origintrail.io GitHub:github.com/OriginTrail/dk… Friday Notebook AI 驱动的研究笔记本。核心功能:把研究笔记、时间线、原始输入组织成 Topic,然后自动生成 Wiki,并且随时间持续优化。 Friday LiveApps 可以把 Wiki 转成轻量工作区、Markdown 文件、可复用的输出格式。Friday Search 可以做深度研究——提出复杂问题,AI 自动探索网页、分析来源、输出洞察。 和 Karpathy Pipeline 最接近的现成产品方向。差别是 Karpathy 是 DIY 脚本拼接,Friday 是集成产品。 官网:friday.inspiredone.ai
Andrej Karpathy@karpathy

LLM Knowledge Bases Something I'm finding very useful recently: using LLMs to build personal knowledge bases for various topics of research interest. In this way, a large fraction of my recent token throughput is going less into manipulating code, and more into manipulating knowledge (stored as markdown and images). The latest LLMs are quite good at it. So: Data ingest: I index source documents (articles, papers, repos, datasets, images, etc.) into a raw/ directory, then I use an LLM to incrementally "compile" a wiki, which is just a collection of .md files in a directory structure. The wiki includes summaries of all the data in raw/, backlinks, and then it categorizes data into concepts, writes articles for them, and links them all. To convert web articles into .md files I like to use the Obsidian Web Clipper extension, and then I also use a hotkey to download all the related images to local so that my LLM can easily reference them. IDE: I use Obsidian as the IDE "frontend" where I can view the raw data, the the compiled wiki, and the derived visualizations. Important to note that the LLM writes and maintains all of the data of the wiki, I rarely touch it directly. I've played with a few Obsidian plugins to render and view data in other ways (e.g. Marp for slides). Q&A: Where things get interesting is that once your wiki is big enough (e.g. mine on some recent research is ~100 articles and ~400K words), you can ask your LLM agent all kinds of complex questions against the wiki, and it will go off, research the answers, etc. I thought I had to reach for fancy RAG, but the LLM has been pretty good about auto-maintaining index files and brief summaries of all the documents and it reads all the important related data fairly easily at this ~small scale. Output: Instead of getting answers in text/terminal, I like to have it render markdown files for me, or slide shows (Marp format), or matplotlib images, all of which I then view again in Obsidian. You can imagine many other visual output formats depending on the query. Often, I end up "filing" the outputs back into the wiki to enhance it for further queries. So my own explorations and queries always "add up" in the knowledge base. Linting: I've run some LLM "health checks" over the wiki to e.g. find inconsistent data, impute missing data (with web searchers), find interesting connections for new article candidates, etc., to incrementally clean up the wiki and enhance its overall data integrity. The LLMs are quite good at suggesting further questions to ask and look into. Extra tools: I find myself developing additional tools to process the data, e.g. I vibe coded a small and naive search engine over the wiki, which I both use directly (in a web ui), but more often I want to hand it off to an LLM via CLI as a tool for larger queries. Further explorations: As the repo grows, the natural desire is to also think about synthetic data generation + finetuning to have your LLM "know" the data in its weights instead of just context windows. TLDR: raw data from a given number of sources is collected, then compiled by an LLM into a .md wiki, then operated on by various CLIs by the LLM to do Q&A and to incrementally enhance the wiki, and all of it viewable in Obsidian. You rarely ever write or edit the wiki manually, it's the domain of the LLM. I think there is room here for an incredible new product instead of a hacky collection of scripts.

中文
0
1
4
189
Roger
Roger@gerrox·
Karpathy 的 LLM 知识库 Pipeline 整个 Pipeline 用一句话概括:把互联网上的原始信息扔进 LLM,LLM 帮你编译成结构化的 Markdown 知识库,然后你用这个知识库回答任何问题。 展开来有 7 个环节: 1. Data Ingest(数据摄入) 原始资料——论文、文章、代码库、数据集、图片——全部丢进一个 raw/ 目录。用 Obsidian Web Clipper 把网页裁切成 Markdown,图片同步下载到本地。 核心逻辑很直接:数据格式统一为 Markdown,LLM 才能高效处理。 信息散落在 PDF、截图、浏览器书签、各种 SaaS 产品里,LLM 无从下手。 2. Wiki Compilation(维基编译) LLM 把 raw/ 里的原始材料编译成结构化的目录树。自动分类、写摘要、建立双向链接、把相关概念整合成专题文章。 这个 Wiki 不是人写的,是 LLM 写的。人只负责往 raw/ 里丢东西,剩下的交给模型。 3. IDE(前端界面) 用 Obsidian 当编辑器,看原始数据、看编译好的 Wiki、看 LLM 生成的可视化。Karpathy 几乎不手写内容,Obsidian 只是"浏览器"。 Obsidian 的插件生态让输出格式可以切换。比如 Marp 插件——把 Markdown 直接转成幻灯片。 4. Q&A(对话式查询) Wiki 够大之后(Karpathy 自己的某个研究 Wiki 有约 100 篇文章、40 万字),可以直接向 LLM Agent 提问。Agent 会自动维护索引文件,读取相关文档,给出结构化回答。 Karpathy 原话:我以为需要搞 fancy 的 RAG 方案,结果 LLM 自己维护索引就够了,至少在这个规模是这样。 5. Output(多样化输出) 回答不只是一段文字。LLM 可以生成 Markdown 文件、Marp 幻灯片、matplotlib 图表。这些输出又被归档回 Wiki 里,成为知识库的一部分。 每次提问都在"增值"。你的探索不是用完即弃的。 6. Linting(维护与校验) 定期跑 LLM "健康检查"——找矛盾数据、补全缺失信息(配合 Web 搜索)、发现新文章候选、提出下一个值得研究的问题。 LLM 很擅长提出下一步该问什么。 7. Extra Tools + Future Explorations(工具链扩展) Karpathy 自己 vibe code 了一个简易搜索引擎,既可以自己在 Web UI 里用,也交给 LLM Agent 作 CLI 工具处理更大规模的查询。 更长远的方向:用 Wiki 数据做 synthetic data generation + finetuning,让 LLM 把知识内化到权重里,不再依赖上下文窗口。
中文
0
0
0
77
Roger
Roger@gerrox·
你的同事不是离职了,之前变成了 token 陪着你
Roger tweet media
中文
0
0
0
40
Roger
Roger@gerrox·
@Gorden_Sun huggingface 上基于 Opus 蒸馏的 Qwen3.5 27B 更强,agent 能力也蛮够用的
中文
1
1
12
5K
Gorden Sun
Gorden Sun@Gorden_Sun·
Gemma 4和Qwen3.5 27B的评分对比 基本每一项都是Qwen3.5 27B领先。
Gorden Sun tweet media
中文
35
11
144
52.4K
Roger đã retweet
jack
jack@jack·
everything is programming
English
2.6K
3.7K
23.2K
1.4M
Roger
Roger@gerrox·
从 Claude Code 编译源码中提取的所有硬编码提示词、指令、系统消息和模板字符串。 github.com/roger2ai/claud…
中文
2
0
0
102
Roger
Roger@gerrox·
@StarWindv9 下来试试,我这两天让 ai 自己尝试把缺的依赖自己尝试实现,现在 chrome control 和 computer use 都已经跑通了,还在调试
中文
0
0
0
176
Roger
Roger@gerrox·
昨天泄露的 Claude Code 源码是没法直接编译的,因为缺乏依赖文件。 于是修复了所有缺失文件、断裂引用和运行时错误,使其可以正常编译运行。 经测试,主力工具(Bash、文件读写、搜索、WebFetch)都正常。 github.com/roger2ai/Claud…
中文
8
43
265
26.4K
Roger
Roger@gerrox·
最近一周用 xiaomi mimo v2 pro 跑 Openclaw 感觉效果还可以,长期来看模型成本肯定还是能下降的,说不定 ds4 出来后,agent 的成本就打下来了。
中文
2
0
0
214
Roger
Roger@gerrox·
昨天修复了泄露的 Claude Code 源码,能够在本地编译运行,今天对 Claude Code 的内部架构进行了深度拆解,同时针对不同领域的方向进行了更加系统的分析。 你能学到: - Agent 循环如何工作(状态机、7 种 transition 原因、pre-API pipeline) - 上下文管理如何防止窗口溢出(6 层防线、autocompact、microcompact) - 工具系统如何构建(40+ 工具、Zod schema、流式执行) - Bash 命令如何被安全保护(23K 行解析器 + 安全引擎) - 多 Agent 协调如何实现(leader-worker、4 种 backend、权限同步) - 插件如何扩展系统(marketplace、MCPB、生命周期管理) - 记忆如何跨会话持久化(3 层架构、forked agent 提取) 推荐阅读顺序: 构建 Agent 框架: 架构 → 上下文管理 → 工具系统 关注安全: 安全 → Bash 解析器 + 安全引擎 构建插件系统: 插件系统 → 加载器 + 市场 做多 Agent: Agent 系统 → swarm + backend + 权限 调试 Claude Code: 支撑系统 → 记忆 + 技能 github.com/roger2ai/claud…
中文
0
0
3
490
Roger
Roger@gerrox·
本项目对 Claude Code 的内部架构进行了深度拆解,同时针对不同领域的方向进行了更加系统的分析。 你能学到: - Agent 循环如何工作(状态机、7 种 transition 原因、pre-API pipeline) - 上下文管理如何防止窗口溢出(6 层防线、autocompact、microcompact) - 工具系统如何构建(40+ 工具、Zod schema、流式执行) - Bash 命令如何被安全保护(23K 行解析器 + 安全引擎) - 多 Agent 协调如何实现(leader-worker、4 种 backend、权限同步) - 插件如何扩展系统(marketplace、MCPB、生命周期管理) - 记忆如何跨会话持久化(3 层架构、forked agent 提取) 推荐阅读顺序: 构建 Agent 框架: 架构 → 上下文管理 → 工具系统 关注安全: 安全 → Bash 解析器 + 安全引擎 构建插件系统: 插件系统 → 加载器 + 市场 做多 Agent: Agent 系统 → swarm + backend + 权限 调试 Claude Code: 支撑系统 → 记忆 + 技能 github.com/roger2ai/claud…
中文
2
0
1
150