界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

constraint_composition

constraint_composition

【效率与协作】Compose multiple FUDGE future constraints, especially topic-word constraints, by summing weighted log probabilities.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: constraint_composition description: Compose multiple FUDGE future constraints, especially topic-word constraints, by summing weighted log probabilities.

Constraint Composition for Topics

Use this skill when a FUDGE decoder must condition on several target words or independent attributes. For topic control, compute (lambda/N) * sum_j log P(w_j | prefix+candidate).

Inputs

  • Candidate-to-target probability table.
  • Ordered list of target words or attributes.
  • lambda_value and whether to normalize by N.

Outputs

  • Composed future log score per candidate.
  • Audit contributions per candidate and per target.

Workflow

  1. Ensure every candidate has every target probability.
  2. Clip probabilities to avoid log(0).
  3. Compute the target weight.
  4. Sum weighted log-probability contributions.
  5. Pass the composed score to the FUDGE rescoring skill.

Validation

Run python tests/test_composition.py.

我的收藏