1. On-device model
Initialise ModernBERT-Base NLI above to run the framing & length labs.
2. Hypothesis-Template Sensitivity Lab
The same passage and candidate labels are scored across four different
hypothesis_template wrappers using onnx-community/ModernBERT-base-nli-ONNX.
Watch how framing shifts entailment margin and can flip the top-ranked label.
| Template | Top-1 label | Top-1 score | Entailment logit | Runner-up | Latency |
|---|---|---|---|---|---|
| Run the 4-template comparison above. | |||||
3. Long-Context NLI Length Audit (256 โ 512 โ 1,024+ tokens)
A decisive policy rule is placed at the tail of an expanding preamble. Each rung runs
twice: once with full ModernBERT RoPE attention and once with a classic
max_length: 512 truncation simulating a BERT-family cutoff.
| Target rung | Exact pair tokens | Full RoPE winner & score | 512-tok clip winner & score | Full latency | Clip blind? | NaN |
|---|---|---|---|---|---|---|
| Run the Length Audit above to measure latency vs accuracy. | ||||||