← 返回起始笔记位置

知识卡片

结构图卡 · 6602.j · 生成模型:GPT-6

语言因果模块与推断模块分工

理解等级:中级

结构图:

flowchart TD
 K[国王生成机制p K] --> P[王子机制p P给定K]
 K --> Y[王国机制p Y给定K P]
 P --> Y
 E[观测王子文本p] --> Q[推断提议q K给定p]
 Q --> W[按目标与提议概率校正]
 D[干预王子为p] --> M[替换王子机制并保留p K]
 M --> I[向前生成王国文本]

推断提议属于计算辅助,不添加到原生成DAG中;无论哪种路径都需保证采样与评分一致。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      def proposal_given_prince(): #2 prince = encode(PRINCE_STORY) #2 king = pyro.sample( #3 "King", #3 TransformerModelDistribution(prince2king_model, prince) #3 ) #3 king_and_prince = torch.cat([king, prince], dim=1) #3 kingdom = pyro.sample( #4 "Kingdom", #4 TransformerModelDistribution(kingdom_model, king_and_prince) #4 ) #4 vignette = (convert_to_text(king) + #5 PRINCE_STORY + #5 convert_to_text(kingdom)) #5 return vignette #1 We condition the model on this value of the Prince variable.

    参考来源

    - 位置:《Causal AI》第13章《因果与大语言模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-13.xhtml) - 结论依据:摘录中关于语言因果模块与推断模块分工的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:def proposal_given_prince(): #2 prince = encode(PRINCE_STORY) #2 king = pyro.sample( #3 "King", #3 TransformerModelDistribution(prince2king_model, prince) #3 ) #3 king_and_prince = torch.cat([king, prince], dim=1) #3 kingdom = pyro.sample( #4 "Kingdom", #4 TransformerModelDistribution(kingdom_model, king_and_prince) #4 ) #4 vignette = (convert_to_text(king) + #5 PRINCE_STORY + #5 convert_to_text(kingdom)) #5 return vignette #1 We condition the model on this value of the Prince variable.