summarization · 362.32 MB WASM q8 · 12E / 6D BartForConditionalGeneration · XSum 1-Sentence · Apache-2.0

DistilBART XSum 12-6 — Extreme 1-Sentence Headline Synthesizer

sshleifer/distilbart-xsum-12-6 (served via Xenova/distilbart-xsum-12-6, Apache-2.0) keeps all 12 encoder layers from facebook/bart-large-xsum while distilling the decoder to 6 layers. Unlike CNN/DailyMail multi-sentence summarizers, XSum forces an extreme 1-sentence BBC-style synthesis offline in 362.32 MB (345.53 MiB) q8 WASM.

Upstream Model sshleifer/distilbart-xsum-12-6
ONNX Artifact Xenova/distilbart-xsum-12-6
Pipeline Task summarization
Architecture BartForConditionalGeneration (12E / 6D)
Size & Quant 362.32 MB · WASM q8
License Apache-2.0

1. Live Extreme 1-Sentence Headline Desk

Pick an article preset, drop or upload a document (.txt/.md/.csv/.json), paste (Ctrl/Cmd+V), or enter up to 1,024 BPE tokens:

Drop a .txt, .md, .csv, or .json file here, or press Ctrl/Cmd+V anywhere outside editable fields. Runs off-main-thread in a Web Worker.
Initialize the model above to synthesize an extreme 1-sentence headline.
Inference latency–
Token compression–
Novel 2-gram rate–
Sentences / flow–
Ungrounded flags–
Backend / dtypeWASM · q8

See Inside · Novel N-Gram Abstractiveness vs CNN/DM

XSum headlines average ~35.8% novel bigrams vs ~16.0% for CNN/DM extractive leads.

Run summarization to measure novel 1-gram, 2-gram, and 3-gram rates.

See Inside · Novel vs Grounded Tokens & Entity Risk

Blue tokens are novel abstractive words; red tokens flag ungrounded entities or figures.

Run summarization to inspect token grounding against the source.

Live Per-Token Decode Cadence (measured via TextStreamer at num_beams = 1)

2. Why 12-Encoder / 6-Decoder XSum Matters

In sequence-to-sequence distillation, keeping all 12 encoder layers preserves full-document reading comprehension while halving the autoregressive decoder from 12 to 6 layers cuts token-by-token WASM latency roughly in half. Paired with XSum's single-sentence BBC objective (length_penalty: 0.5), it turns multi-paragraph briefs into punchy headlines — though extreme compression also amplifies entity hallucination, which we audit in Wild and Multi-model.

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";

const summarizer = await pipeline(
  "summarization",
  "Xenova/distilbart-xsum-12-6",
  { device: "wasm", dtype: "q8" }
);
const [{ summary_text }] = await summarizer(article, {
  min_new_tokens: 11,
  max_new_tokens: 62,
  num_beams: 1,
  length_penalty: 0.5,
  no_repeat_ngram_size: 3,
});
Show the code · worker.js — runSummarize() (362.32 MB q8 WASM worker)
Show the code · xsum-core.mjs — computeAbstractivenessMetrics()

3. Model Card & References