Basics · Lead-Sentence vs XSum Synthesis & Length-Penalty Ablation · 362.32 MB WASM q8 · Apache-2.0

Inside XSum Compression: Lead-1 Baseline vs Abstractive Synthesis

Extractive news summarizers often copy the first sentence verbatim. Here, sshleifer/distilbart-xsum-12-6 (Apache-2.0) synthesizes buried facts into a single headline — then ablates length_penalty across 0.2, 0.5 (HF default), and 1.5 with beam search.

1. Extractive Lead-1 Baseline vs XSum 1-Sentence Synthesis

Token Compression–
XSum Novel 2-Grams–
ROUGE-1 vs Lead-1–
ROUGE-1 vs Source–
Sentences–
Latency–

Extractive Lead-1 Baseline (0.0% Novel Bigrams)

Simple first-sentence extraction — fails whenever the real news sits in sentence 2+.

Run comparison above to extract the Lead-1 baseline.

DistilBART XSum 1-Sentence Headline

Synthesizes across all 12 encoder layers into a single BBC-style sentence.

Run comparison above to synthesize XSum headline.

2. Live length_penalty Beam Ablation (0.2 vs 0.5 vs 1.5)

In generation_config.json, DistilBART XSum ships length_penalty: 0.5 (far below CNN/DM's 2.0) to discourage multi-sentence drift. Run all 3 settings at num_beams: 2 on the article above to observe how token length, novel bigrams, and sentence count shift.

DistilBART XSum length_penalty ablation across 0.2, 0.5, and 1.5
length_penalty Out Tokens Compression Novel 2-Grams Sentences Latency Generated Headline
Run the ablation above to compare 0.2, 0.5, and 1.5.

3. Inspect Compression & ROUGE Overlap Helpers

Show the code · xsum-core.mjs — computeCompressionMetrics()
Show the code · xsum-core.mjs — computeRougeOverlap()