LogoThread Easy
  • Explorar
  • Criar thread
LogoThread Easy

Seu parceiro completo para threads do Twitter

© 2025 Thread Easy All Rights Reserved.

Explorar

Newest first — browse tweet threads

Keep on to blur preview images; turn off to show them clearly

RT @TencentHunyuan: 🚀🚀🚀Introducing HY World 1.5 (WorldPlay)! We have now open-sourced the most systemized, comprehensive real-time world mo…

RT @TencentHunyuan: 🚀🚀🚀Introducing HY World 1.5 (WorldPlay)! We have now open-sourced the most systemized, comprehensive real-time world mo…

Co-founder & CEO @HuggingFace 🤗, the open and collaborative platform for AI builders

avatar for clem 🤗
clem 🤗
Wed Dec 17 13:32:02
RT @DevOpsAndBeyond: Reachy Mini has been spotted in Eastern Westphalia, Germany! Thank you for the early xmas present! 🙃@pollenrobotics @h…

RT @DevOpsAndBeyond: Reachy Mini has been spotted in Eastern Westphalia, Germany! Thank you for the early xmas present! 🙃@pollenrobotics @h…

Co-founder & CEO @HuggingFace 🤗, the open and collaborative platform for AI builders

avatar for clem 🤗
clem 🤗
Wed Dec 17 13:26:02
Amazing art exhibition, at the residence of the Canadian High commissioner. 

Also Bros Efe finally found who stole his laptop.

Amazing art exhibition, at the residence of the Canadian High commissioner. Also Bros Efe finally found who stole his laptop.

Founder | Author | Speaker Building @beltstripe. Healtech/EdTech/Agric I'm Not The Man Of Your Dreams. Your Imagination Wasn't This Great.

avatar for Sani Yusuf
Sani Yusuf
Wed Dec 17 13:19:12
India used to be somewhat ahead of China
so bizarre every time I see it
And what India has fumbled the most was not military technology or manufacturing, but the very basics of civilian livelihood

India used to be somewhat ahead of China so bizarre every time I see it And what India has fumbled the most was not military technology or manufacturing, but the very basics of civilian livelihood

We're in a race. It's not USA vs China but humans and AGIs vs ape power centralization. @deepseek_ai stan #1, 2023–Deep Time «C’est la guerre.» ®1

avatar for Teortaxes▶️ (DeepSeek 推特🐋铁粉 2023 – ∞)
Teortaxes▶️ (DeepSeek 推特🐋铁粉 2023 – ∞)
Wed Dec 17 13:17:55
成本直降 90%,延迟缩减 85%:深度解读 Prompt Caching 技术原理

来自 @ngrokHQ 团队 @samwhoo 关于 Prompt Caching 的技术博客,Sam 从底层原理到厂商实测,非常清晰地揭示了这项技术如何成为 LLM 应用降本增效的“杀手锏”。

核心原理:缓存的不是“文本”,是“思维状态”
  很多人误以为 Prompt Caching 只是简单地存储了输入的文本。实际上,它复用的是模型推理过程中最昂贵的中间产物—— K (Key) 和 V (Value) 矩阵(即 KV Cache)。

  LLM 在处理每个 Token 时,都需要通过注意力机制计算它与上下文的关系。
· 无缓存时:每生成一个新字,模型都要重新计算全文的 K/V 矩阵,造成巨大的算力浪费。
· 有缓存时:直接从显存中读取之前算好的矩阵,跳过繁重的矩阵乘法。

这就是为什么它能带来双重红利:既节省了约 90% 的 Token 费用,又将长文本场景下的首字延迟降低了 85%。

厂商实测:OpenAI vs. Anthropic 的策略差异
在实际落地中,两家主流厂商的策略截然不同,直接影响系统的稳定性:

1. OpenAI(全自动黑盒):
系统自动尝试路由请求以匹配缓存,开发者无需改代码。但代价是不可控——实测中缓存命中率并不稳定,仅在 50% 左右。
2. Anthropic(手动白盒):
允许开发者显式设置“缓存断点”。虽然增加了开发门槛,但在规范设置下,实测命中率高达 100%。对于追求极致稳定性的生产环境,Anthropic 目前的表现更优。

开发者需要关注的技术细节
· 参数无关性:调整 temperature 或 top_p 等采样参数不会导致缓存失效。因为缓存发生在采样之前的注意力计算阶段,这给应用调试留出了很大空间。
· 生命周期:由于 H100 显存极其昂贵,缓存通常只保留 5-10 分钟。想要长期复用,需要保持高频的请求来“刷新”缓存的生命周期。

总结
Prompt Caching 的本质,是将昂贵的“计算资源”转化为相对廉价的“存储读取”。对于 RAG、长文档分析或多轮对话应用而言,这是一项不仅能省钱,更能显著提升用户体验的关键技术。

参考原文

成本直降 90%,延迟缩减 85%:深度解读 Prompt Caching 技术原理 来自 @ngrokHQ 团队 @samwhoo 关于 Prompt Caching 的技术博客,Sam 从底层原理到厂商实测,非常清晰地揭示了这项技术如何成为 LLM 应用降本增效的“杀手锏”。 核心原理:缓存的不是“文本”,是“思维状态” 很多人误以为 Prompt Caching 只是简单地存储了输入的文本。实际上,它复用的是模型推理过程中最昂贵的中间产物—— K (Key) 和 V (Value) 矩阵(即 KV Cache)。 LLM 在处理每个 Token 时,都需要通过注意力机制计算它与上下文的关系。 · 无缓存时:每生成一个新字,模型都要重新计算全文的 K/V 矩阵,造成巨大的算力浪费。 · 有缓存时:直接从显存中读取之前算好的矩阵,跳过繁重的矩阵乘法。 这就是为什么它能带来双重红利:既节省了约 90% 的 Token 费用,又将长文本场景下的首字延迟降低了 85%。 厂商实测:OpenAI vs. Anthropic 的策略差异 在实际落地中,两家主流厂商的策略截然不同,直接影响系统的稳定性: 1. OpenAI(全自动黑盒): 系统自动尝试路由请求以匹配缓存,开发者无需改代码。但代价是不可控——实测中缓存命中率并不稳定,仅在 50% 左右。 2. Anthropic(手动白盒): 允许开发者显式设置“缓存断点”。虽然增加了开发门槛,但在规范设置下,实测命中率高达 100%。对于追求极致稳定性的生产环境,Anthropic 目前的表现更优。 开发者需要关注的技术细节 · 参数无关性:调整 temperature 或 top_p 等采样参数不会导致缓存失效。因为缓存发生在采样之前的注意力计算阶段,这给应用调试留出了很大空间。 · 生命周期:由于 H100 显存极其昂贵,缓存通常只保留 5-10 分钟。想要长期复用,需要保持高频的请求来“刷新”缓存的生命周期。 总结 Prompt Caching 的本质,是将昂贵的“计算资源”转化为相对廉价的“存储读取”。对于 RAG、长文档分析或多轮对话应用而言,这是一项不仅能省钱,更能显著提升用户体验的关键技术。 参考原文

邵猛,中年失业程序员 😂 专注 - Context Engineering, AI Agents. 分享 - AI papers, apps and OSS. ex Microsoft MVP 合作 - 私信/邮箱:shaomeng@outlook.com 📢 公众号/小红书: AI 启蒙小伙伴

avatar for meng shao
meng shao
Wed Dec 17 13:14:24
RT @tysonthomas90: Reachy Mini showing the dance moves just in time for Christmas! @huggingface @pollenrobotics

RT @tysonthomas90: Reachy Mini showing the dance moves just in time for Christmas! @huggingface @pollenrobotics

Co-founder & CEO @HuggingFace 🤗, the open and collaborative platform for AI builders

avatar for clem 🤗
clem 🤗
Wed Dec 17 13:12:22
  • Previous
  • 1
  • More pages
  • 522
  • 523
  • 524
  • More pages
  • 5634
  • Next