知识卡片
流式展示与完整记录分开
流式打印用于观察进度,累计 token 后统一解码用于后续处理,两者服务不同目的。验证器应接收完整生成结果,避免控制台截断、逐 token 显示瑕疵或未收集完的文本改变答案抽取。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 评估推理模型
原书出处 · 1 处
- · 查看原书依据
we can read the output while it's being generated. At the same time, we collect the generated tokens into a list so that we can later decode them into the complete final answer string. This pattern of both streaming and collecting tokens is handy because it lets us monitor the generation live while still storing the full answer text (all_tokens) that we can process later.
参考来源
- 位置:《Build a Reasoning Model (From Scratch)》第03章《评估推理模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Build a Reasoning Model (From Scratch)/_epub-src/OEBPS/Text/chapter-3.html)
- 结论依据:摘录中关于流式展示与完整记录分开的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:we can read the output while it's being generated. At the same time, we collect the generated tokens into a list so that we can later decode them into the complete final answer string. This pattern of both streaming and collecting tokens is handy because it lets us monitor the generation live while still storing the full answer text (all_tokens) that we can process later.