basics · ablation lab · prompt framing · 1s/3s/7s crops · temperature

Prompt Framing, Duration Crops & Logit-Scale Sensitivity

CLAP compares a 48 kHz audio vector against RoBERTa text embeddings, pads clips shorter than 10 s via repeatpad, and sharpens cosines by a learned logit_scale. Measure all three mechanisms live on the same audio clip.

Model Status (207.05 MB q8 WASM)

1 · Audio Clip & Base Concepts

Drop, paste, or choose any audio file to run framing and crop ablations on your own recording.
Click to record audio for ablation.
Loading sample… 48,000 Hz mono

2 · Prompt Framing vs Duration Crop Sensitivity

A. Prompt-Template Framing Ablation

Compares bare "{label}" vs "a sound of {label}" vs "live studio recording of {label}" on the identical audio clip.

B. Duration Crop Sensitivity (1 s vs 3 s vs 7 s)

Slices the opening 1 s, 3 s, and 7 s windows (CLAP applies repeatpad to 10 s).

Full 6-Condition Ablation Matrix

Prompt template framing and duration crop ablation metrics
Experiment Condition Top-1 Label Softmax Prob Raw Cosine Margin Norm Entropy Latency
Load the model and run the ablation sweep to populate live results.

3 · Live Temperature & Logit-Scale Inspector

CLAP multiplies unit-normalized cosines by a learned scalar (logit_scale) before softmax. Drag temperature T below (T = 1.00 is the exact native model output) to see how logit scaling controls confidence sharpness and Shannon entropy without re-running ONNX inference.

    Show the Code (Softmax Temperature & Logit Scale)

    Show the code: Numerically stable temperature softmax (clap-music-core.mjs)
    Show the code: Live effective logit_scale derivation from logits/cosines (clap-music-core.mjs)