Skip to content
Back to skills

Cad Decoding Policy

ASecurity

Select tokens from regular or CAD-adjusted logits using comparable greedy or top-p decoding policies.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testinggit

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill cad_decoding_policy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cad Decoding Policy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cad Decoding Policy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-cad-decoding-policy/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-cad-decoding-policy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: cad_decoding_policy
description: Select tokens from regular or CAD-adjusted logits using comparable greedy or top-p decoding policies.
---

# 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`: `greedy` or `top_p`.
- Optional `top_p` and random seed.

## Outputs
A selection trace containing selected token, probabilities, candidate set, and mode.

## Workflow
1. Convert logits to probabilities with softmax.
2. Greedy mode chooses the highest-scoring token deterministically.
3. Top-p mode keeps the minimal nucleus with cumulative mass at least `top_p` and samples with the supplied seed.
4. 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…