知识卡片

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

梯度累积改变更新批量

理解等级:高级

将多个微批次梯度按一致归一规则累积,再做一次优化器更新,可提高有效批量而不同时保存全部激活。有效批量还包含设备数;与大批完全等价需满足相同损失加权、随机与层行为等条件。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Gradient accumulation Let’s say we have a desired batch size but we do not have the required memory to support that batch size. We can simulate the desired batch size using a technique called gradient accumulation. In this technique, the gradient updates are not done at every batch, but are accumulated over several batches and then summed or averaged. Note Gradient accumulation can make training

    参考来源

    - 位置:《Designing Large Language Model Applications》第06章《微调》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Designing Large Language Model Applications/_epub-src/OEBPS/ch06.html) - 结论依据:摘录中关于梯度累积改变更新批量的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Gradient accumulation Let’s say we have a desired batch size but we do not have the required memory to support that batch size. We can simulate the desired batch size using a technique called gradient accumulation. In this technique, the gradient updates are not done at every batch, but are accumulated over several batches and then summed or averaged. Note Gradient accumulation can make training