Run the truncation experiment
Full 8,192-token Granite R2 ranking
Run the comparison to rank all 4 handbooks at full context.
Truncated 256-token Granite R2 ranking
Run the comparison to see what happens when the tail is sliced off.
Exact tokenizer cutoff & [CLS] vector shift
The ModernBERT tokenizer slices the target document right at the chosen cutoff. Everything shaded below the red line never enters the short-context forward pass — while Granite R2 attends across the entire document.
Full 8,192-token [CLS] fingerprint (first 96 dims)
–
Truncated [CLS] fingerprint (first 96 dims)
–
Show the code
Inspect the exact vanilla ES module functions running in this tab — no build step, no server proxy.