CAD Decoding Policy
Use this skill after CAD logit adjustment when selecting the next token. It preserves the paper's rule that CAD changes the logits while the outer decoding strategy remains comparable to the regular baseline.
Inputs
- Logit mapping from token to score.
mode:greedyortop_p.- Optional
top_pand random seed.
Outputs
A selection trace containing selected token, probabilities, candidate set, and mode.
Workflow
- Convert logits to probabilities with softmax.
- Greedy mode chooses the highest-scoring token deterministically.
- Top-p mode keeps the minimal nucleus with cumulative mass at least
top_pand samples with the supplied seed. - Return the candidate set for audit.
Validation
Run tests/test_decoding_policy.py or Distiller validation.
Limitations
This skill does not compute CAD logits; it consumes whichever logits are supplied.