知识卡片
分段编码可能改变边界词元
分别编码 prompt 与 answer 再拼 token,未必等同于编码连接后的全文,特殊模板还可能重复插入控制 token。评分时应与实际生成的 token 序列和提示边界对齐;独立字符串长度不能无条件当作真实 token 边界。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
#A Encode prompt and answer tokens separately to get the prompt length later #B Same as in calc_next_token_logprobas before #C Index range for positions corresponding to answer tokens #D Same as before, except for using start and end #E Average over the answer token scores The avg_logprob_answer function is overall similar to the calc_next_token_logprobas function from the previous section, except that we only calculate the
参考来源
- 位置:《Build a Reasoning Model (From Scratch)》第05章《自我修正与推理时扩展》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Build a Reasoning Model (From Scratch)/_epub-src/OEBPS/Text/chapter-5.html)
- 结论依据:摘录中关于分段编码可能改变边界词元的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:#A Encode prompt and answer tokens separately to get the prompt length later #B Same as in calc_next_token_logprobas before #C Index range for positions corresponding to answer tokens #D Same as before, except for using start and end #E Average over the answer token scores The avg_logprob_answer function is overall similar to the calc_next_token_logprobas function from the previous section, except that we only calculate the