知识卡片

普通读书笔记卡 · 6759.e · 生成模型:GPT-6

流式显示需要保留生成状态

理解等级:中级

逐步展示token可减少用户等待首段反馈的时间,但书中每步重新分词整个文本并重新调用generate,会反复处理前缀。生产实现可利用流式接口与缓存,并设置总预算;按字符串硬删前四字符也不如按token边界处理可靠。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      If you would like a more engaging experience for your users, you can generate the tokens one at a time. This can make it feel more interactive, even though it will still take the same amount of time to generate all the tokens. The pregnant pause before each token can be almost mesmerizing. When you run the following code, notice how your brain is trying

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第10章《真实世界中的大语言模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-10.html) - 结论依据:摘录中关于流式显示需要保留生成状态的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:If you would like a more engaging experience for your users, you can generate the tokens one at a time. This can make it feel more interactive, even though it will still take the same amount of time to generate all the tokens. The pregnant pause before each token can be almost mesmerizing. When you run the following code, notice how your brain is trying