← All models

summarization Β· text Β· WASM Β· ~460 MB

BART-large-CNN β€” the canonical news summarizer

The full-size BART fine-tuned on CNN/DailyMail news β€” the model most abstractive-summary papers benchmark against. It reads long text and writes a shorter abstractive summary in fresh sentences. It's larger and slower than DistilBART, and usually tighter and more faithful. Paste something and watch the summary stream in. Nothing leaves your device.

At a glance

ModelXenova/bart-large-cnn
Task / pipelinesummarization (sequence-to-sequence)
ArchitectureBART-large β€” 12 encoder + 12 decoder layers (~406M params), the full model DistilBART distils from
Trained onCNN/DailyMail β€” so it writes news-style summaries
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~460 MB (encoder + decoder), cached after first load β€” larger than DistilBART's ~250 MB
LicenseMIT
Web APIsWebAssembly, Web Workers β€” all Baseline widely available

Prefer speed and a smaller download? The distilled sibling DistilBART CNN is ~250 MB and about twice as fast β€” this page is for when you want the higher-quality original.

Run it

Paste any text, set the length budget, and summarize. Greedy decoding streams the summary live and records real per-token timing; turn up the beams for a slower, often tighter result.

Summary

See inside β€” tokens, compression & decode timing

A summarizer is really a compressor. Here's what it actually did: how many tokens went in versus came out, how much shorter that is, and β€” for greedy decoding β€” the real time each output token took to generate. BART-large runs more layers than DistilBART, so expect a longer per-token time.

Tokens in
–
Tokens out
–
Compression
–
Chars saved
–

Per-token decode timeline (ms per token):

Why it matters

Summarization turns a wall of text into something you can act on in seconds β€” and doing it on-device with the higher-quality original means fewer factual slips and tighter phrasing, without shipping a word to a server. No API key, no per-call bill, no data-handling agreement.

Use cases

Basics

Summarize a sample article and dial the length up and down to feel the trade-off.

Practical

TL;DR your own news, report or long doc β€” paragraph or bullet-point mode.

Wild

Recursively summarize a summary until the whole thing collapses to one sentence.

Multi-model

Summarize, then have Kokoro read the TL;DR aloud β€” text in, spoken recap out.

How the API works

Summarization is one pipeline call; length is controlled with generation parameters:

import { pipeline } from "@huggingface/transformers";

const summarizer = await pipeline(
  "summarization",
  "Xenova/bart-large-cnn",
); // downloads + caches ~460 MB once

const out = await summarizer(longText, {
  max_new_tokens: 100,
  min_new_tokens: 30,
  num_beams: 1,          // greedy; raise for tighter (slower) output
  no_repeat_ngram_size: 3,
});
// β†’ [{ summary_text: "…a concise abstractive summary…" }]

For the live token stream and the decode timeline, this page passes a TextStreamer so it can timestamp each generated token β€” all inside a Web Worker so the UI never janks.

References