Repository navigation
Commit d35bb4f
Peter Manshausen
Odds ratio: rescore saved states and expose per-step divergence traces
- `_calculate_odds_ratio_full(start_latents=...)`: skip the forward phase and
run the two backward phases on a given state, so saved samples can be
rescored under different sampler settings without regenerating them.
- `OddsRatioResult.{forward,backward}_divergence_data`: optional per-step
DivergenceTracker records (sigma, divergence, score_divergence).
- `scripts/inference_odds_ratio.py`: batch driver for the TC odds-ratio runs,
with CLI flags for num steps, extra steps / window, guidance window,
Hutchinson samples, `--x0-dir` rescoring and `--save-divergence-traces`.
Public signatures of `sample()` and `calculate_odds_ratio()` are unchanged.
Signed-off-by: Peter Manshausen <pmanshausen@nvidia.com>1 parent 4ce9aee commit d35bb4f
4 files changed
Lines changed: 495 additions & 24 deletions
File tree
- scripts
- src/cbottle
- inference
- tests/unit
0 commit comments