summarization · text · 362.31 MB WASM q8 · 12+6 DistilBART CNN · Apache-2.0

DistilBART CNN 12-6 — Full 12-Layer Encoder, Distilled 6-Layer Decoder

sshleifer/distilbart-cnn-12-6 (ONNX export Xenova/distilbart-cnn-12-6, Apache-2.0) keeps the complete 12-layer BART-large encoder while halving the autoregressive decoder to 6 layers (205.10 MB encoder + 155.10 MB merged decoder + 2.11 MB tokenizer/configs = 362.31 MB q8 WASM). Summarize articles up to 1,024 tokens completely on-device with live token streaming.

Task / Pipeline summarization · BartForConditionalGeneration
Weights & Quant 362.31 MB · WASM q8
Architecture 12 Enc / 6 Dec · 1024 ctx · 50,264 BPE
License Apache-2.0

1. Interactive Abstractive Summarization Studio

Grounded API surface: Calls pipeline("summarization", "Xenova/distilbart-cnn-12-6", { device: "wasm", dtype: "q8" }) via shared Transformers.js 3.7.5 in a dedicated Web Worker, passing min_length, max_length, num_beams, and no_repeat_ngram_size: 3.

Choose a calibrated article or paste/drop your own document below:

Upload or drop a local text file (.txt, .md, .csv, .json) Or paste text anywhere on the page — zero network upload.
Latency–
Decode speed–
In → Out tokens–
Compression–
Novel bigrams–
ROUGE-L F1 vs src–
NaN check–
Backend / dtypeWASM · q8

Generated Abstractive Summary

Pending
Download or initialise DistilBART CNN 12-6 above to stream an abstractive summary locally.

2. See Inside: Decode Timeline & 50,264-Vocab Byte-Level BPE

When num_beams = 1, TextStreamer records the real millisecond interval between decoder steps. Below the timeline, inspect how BART's 50,264-token byte-level BPE splits the input (Ġ marks word-leading spaces, <s>=0, <pad>=1, </s>=2) and check the 1,024-token encoder window.

Word start (Ġ) Continuation (+) Special (<s> / </s>)

Byte-level BPE breakdown will appear after running DistilBART CNN 12-6.

Summarize an article above to inspect BPE subword pieces and window utilization.

3. Why 12-Encoder / 6-Decoder DistilBART Matters & Worker Source

Sam Shleifer & Alexander Rush (2020, Shrink-and-Finetune) showed that keeping all 12 bidirectional encoder layers of bart-large-cnn preserves reading comprehension while cutting the sequential autoregressive decoder from 12 layers down to 6. Compared to distilbart-cnn-6-6 (6+6 layers), distilbart-cnn-12-6 spends extra compute in the parallel encoder pass to boost ROUGE quality while keeping autoregressive generation fast inside WebAssembly.

Show the code — worker.js ensureLoaded() Transformers.js pipeline init
Show the code — worker.js runSingleSummary() streaming & telemetry