← 返回刚才阅读的位置

知识卡片

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

目标填充须从训练损失排除

理解等级:高级

固定长度padding方便批处理,但训练标签中无效填充应使用忽略标记,输入也应提供正确mask。将PAD设为EOS还要区分真实终止与补齐位置,避免错误忽略真实EOS或把大量补齐token计入目标。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      padding='max_length', max_length=max_length ) #1 Set up the tokenizer. #2 The pad token is used to make all the sequences the same length to facilitate matrix operations. It is common to set it to the “end-of-sequence (EOS)” token. #3 The max length of the token is set to 40, as all of the vignettes are less than 40 tokens. Next we’ll create a class and a

    参考来源

    - 位置:《Causal AI》第13章《因果与大语言模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-13.xhtml) - 结论依据:摘录中关于目标填充须从训练损失排除的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:padding='max_length', max_length=max_length ) #1 Set up the tokenizer. #2 The pad token is used to make all the sequences the same length to facilitate matrix operations. It is common to set it to the “end-of-sequence (EOS)” token. #3 The max length of the token is set to 40, as all of the vignettes are less than 40 tokens. Next we’ll create a class and a