Multi-model · DistilBART CNN 12-6 (362.31 MB q8 · Apache-2.0) → DeBERTa-v3 NLI (87.25 MB q8 · MIT)

Summarize → NLI Faithfulness Check: Catching Abstractive Hallucinations On-Device

Stage 1 (Xenova/distilbart-cnn-12-6, 362.31 MB WASM q8, Apache-2.0) condenses the source document into an abstractive summary. Stage 2 (Xenova/nli-deberta-v3-xsmall, 87.25 MB WASM q8, MIT, reusing ../zero-shot-text/worker.js) treats the source article as the NLI premise and scores each generated summary sentence for Entailment, Neutrality, and Contradiction (~449.56 MB combined, 100% local).

1. Two Independent On-Device Models (~449.56 MB Combined)

Stage 1 · DistilBART CNN 12-6 (362.31 MB WASM q8)

Xenova/distilbart-cnn-12-6 · summarization · 12+6 BART · Apache-2.0

Stage 2 · DeBERTa-v3 Zero-Shot NLI (87.25 MB WASM q8)

Xenova/nli-deberta-v3-xsmall · zero-shot-classification · Source→Summary NLI · MIT

2. Configure Source Document & Faithfulness Pipeline

Stage 1 summarizes the article; Stage 2 checks every generated sentence against the source via DeBERTa-v3 NLI.
Faithfulness verdict–
Mean entailment–
Max contradiction–
Stage 1 / Stage 2 ms–
NaN check–

3. Stage 1 Summary & Stage 2 Sentence-by-Sentence NLI Entailment Audit

Stage 1 · DistilBART CNN 12-6 Abstractive Summary

Pending
Initialise Stage 1 above to generate an abstractive summary.
Sentence-level DeBERTa-v3 NLI entailment audit against source premise
Summary Sentence NLI Verdict Entailment Neutral Contradiction 3-Way Distribution
Initialise both stages above and run the pipeline to verify summary faithfulness.

4. Inspect Cross-Model Summary Verification Code

Show the code — distilbart-core.mjs summarizeNliEntailment() 3-way verdict scoring
Show the code — zero-shot-text/worker.js classify() reused Stage 2 NLI logits