最新资讯
reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准 dev.to FreeToken:在自有 GPU 上运行前沿 MoE 模型及其内存需求 dev.to 当 AI Agent 说“完成”时,究竟完成了什么? dev.to 部署 Underdog Bark 3.0 Pro:逐字转写、自定义后端与分块设置 dev.to 为艰难对话构建 AI:五个 Agent、一条安全正则与一位盲评监督者 techcrunch.com Palo Alto Networks 洽谈以 5 亿美元收购 AI Agent 安全初创公司 Clutch theinformation.com 黄仁勋被要求就涉华间谍指控向国会作简报 www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离 wechat 这波杀疯了!旗舰级模型不限量、1个月视频额度免费领 bloomberg.com AI 抛售蔓延至信用市场,软银领跌亚洲美元债 dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露
多元动态
登录 注册
大模型 pub.towardsai.net · @“The AI Engineer”

为什么 LLM 预测 token 而不是单词

原文 我的收藏

文章解释语言模型以介于字符与单词之间的子词 token 为最小处理单位,tokenizer 将文本片段映射为整数 ID,提示词、上下文窗口和定价均以 token 计量。作者指出单词级词表会因专有名词、术语、拼写错误和多语言膨胀到数百万条,且无法表示未见过的词,因此采用子词切分;这一设计会直接影响上下文预算、延迟和费用,并因用户语言不同而放大成本。

AI推荐理由 面向开发者的科普文章,解释 LLM 为何以 token 而非单词或字符为预测单位,并指出 tokenization 直接影响上下文预算、延迟和 API 成本,且不同语言会放大成本差异。正文片段仅覆盖词表规模与未登录词问题,未给出具体数据或实验,属概念性解释而非新发现;来源为 Medium 个人专栏,权威性一般。

62

正文

Member-only story Artificial Intelligence Machine Learning LLM Ai Engineering NLP Why LLMs Predict Tokens Instead of Words “The AI Engineer” 5 min read · 13 hours ago -- Listen Share Press enter or click to view image in full size image created by GEMINI Here’s the friend link…. A design choice with real costs, and who actually pays for it. Ask most developers why a language model predicts tokens instead of words and you will usually get a shrug. Tokens, words, close enough. That shrug is expensive. Tokenizing text into subword units instead of whole words sets your context budget, your latency, and your bill, and depending on which language your users type in, it can quietly multiply your costs before a single API call returns an answer. A token is the smallest unit of text a language model actually reads. Not a character, not a word, a chunk somewhere between the two, produced by a tokenizer that maps each piece to an integer ID the model was trained on. Prompts, context windows, pricing, all of it is measured in these units, not in words. Why Not Whole Words, Why Not Characters Words look like the obvious unit until you count them. English has roughly 170,000 words in active use. Add proper nouns, jargon, typos, and every other language, and a word level vocabulary balloons into the millions, each entry needing its own row in an embedding table. However large you make it, a user will eventually type something it has never seen, and a strictly word level model has no way to represent that.

来源报道 · 1 篇 · 以下链接均前往原始媒体

“The AI Engineer” 为什么 LLM 预测 token 而不是单词 09-21 · 原文发布
← 返回精选动态 原文

更多内容