知识卡片

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

推断只编码源一次再逐步扩展目标

理解等级:中级

翻译可先计算并缓存源编码,再从SOS开始按当前目标前缀解码,选择新词后继续,直到EOS或长度上限。它不必每步重新运行整个编码器;贪心、束搜索和其他采样又有不同选择规则。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Hopefully, by now, you are convinced your model is ready to become your personal German-to-English interpreter. Performing translation requires only slightly more work to set up, which you do in the translate_sentence() function in listing 9.22. In brief, start by tokenizing the source sentence if it has not been tokenized already and capping it with the <sos> and <eos> tokens. Next, call the prepare_src() method

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第09章《可堆叠的Transformer》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-9.html) - 结论依据:摘录中关于推断只编码源一次再逐步扩展目标的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Hopefully, by now, you are convinced your model is ready to become your personal German-to-English interpreter. Performing translation requires only slightly more work to set up, which you do in the translate_sentence() function in listing 9.22. In brief, start by tokenizing the source sentence if it has not been tokenized already and capping it with the <sos> and <eos> tokens. Next, call the prepare_src() method