知识卡片
重要性诊断检查权重退化
采用log权重和归一化可避免直接乘极小文本概率的下溢,但不能解决提议不覆盖或少数样本垄断问题。应检查有效样本量、最大归一权重和重复次数;重采样后得到许多行不意味着拥有同样多独立信息。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 因果与大语言模型
原书出处 · 1 处
- · 查看原书依据
log_importance_weight = model_log_prob - proposal_log_prob #4 sample = (king_text, kingdom_text, log_importance_weight) return sample #1 Extract a sample from the proposal. #2 Calculate the total log probability of the sampled values of King and Kingdom. #3 Calculate the total log probability of the sample values of King and Kingdom under the original model. #4 Calculate the log importance weight. Now we’ll run the importance resampling. Listing
参考来源
- 位置:《Causal AI》第13章《因果与大语言模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-13.xhtml)
- 结论依据:摘录中关于重要性诊断检查权重退化的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:log_importance_weight = model_log_prob - proposal_log_prob #4 sample = (king_text, kingdom_text, log_importance_weight) return sample #1 Extract a sample from the proposal. #2 Calculate the total log probability of the sampled values of King and Kingdom. #3 Calculate the total log probability of the sample values of King and Kingdom under the original model. #4 Calculate the log importance weight. Now we’ll run the importance resampling. Listing