知识卡片

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

逐词目标需要错位一格

理解等级:中级

自回归模型位置 t 的 logits 用来给 token t+1 评分,因此位置索引与目标 ID 必须错开一格。误把同位置输入 token 当目标会测错任务。本章不包含首 token 的无条件概率,计算的是给定首 token 后的续文概率,而非严格完整联合概率。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      target tokens are simply the input tokens shifted by one position, since an LLM is trained to predict the next token in a sequence. For example, given the input "The capital of Germany is Berlin", the model is asked at position 2 (the token for "capital") to predict position 3 (the token for "of"). Using all_probas[t_idx, next_ids] (steps 4 and 5) retrieves exactly these probability

    参考来源

    - 位置:《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) - 结论依据:摘录中关于逐词目标需要错位一格的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:target tokens are simply the input tokens shifted by one position, since an LLM is trained to predict the next token in a sequence. For example, given the input "The capital of Germany is Berlin", the model is asked at position 2 (the token for "capital") to predict position 3 (the token for "of"). Using all_probas[t_idx, next_ids] (steps 4 and 5) retrieves exactly these probability