distilbart-cnn-12-6

What is this model? DistilBART‑CNN‑12‑6 is a distilled version of Facebook’s BART architecture that has been specifically fine‑tuned for summarization

sshleifer 840K downloads apache-2.0 Summarization
Frameworkstransformerspytorchjaxrust
Languagesen
Datasetscnn_dailymailxsum
Tagsbarttext2text-generationsummarization
Downloads
840K
License
apache-2.0
Pipeline
Summarization
Author
sshleifer

Run distilbart-cnn-12-6 locally on a Q4KM hard drive

Accelerate your deployment with a Q4KM hard drive pre‑loaded with distilbart‑cnn‑12‑6 . Get instant access, zero‑download latency, and optimized inference kernels. Get this model on a Q4KM hard drive...

Shop Q4KM Drives

Technical Overview

What is this model? DistilBART‑CNN‑12‑6 is a distilled version of Facebook’s BART architecture that has been specifically fine‑tuned for summarization tasks on the CNN/DailyMail and XSum corpora. It is built to generate concise, fluent, and factually accurate summaries from long‑form English text.

Key features and capabilities

  • Distilled to ~306 M parameters – roughly 75 % fewer parameters than the original BART‑large baseline.
  • Supports the summarization pipeline out‑of‑the‑box via BartForConditionalGeneration.
  • Fast inference: the model processes a typical 400‑word article in ~300 ms on a modern GPU.
  • Competitive ROUGE scores (ROUGE‑2 ≈ 21.3, ROUGE‑L ≈ 30.6) while maintaining a high speed‑up over the full‑size BART.
  • Compatible with PyTorch, JAX, and Rust back‑ends; can be deployed on Azure through the deploy:azure tag.

Architecture highlights

  • Base architecture: BART (Bidirectional and Auto‑Regressive Transformers) with 12 encoder layers and 6 decoder layers.
  • Distillation technique: knowledge‑distillation from the BART‑large model, preserving encoder‑decoder attention patterns while pruning redundant heads.
  • Tokenizer: Same SentencePiece tokenizer as the original BART (≈ 50 k BPE vocabulary).
  • Training objective: standard sequence‑to‑sequence denoising + summarization fine‑tuning on CNN/DailyMail and XSum.

Intended use cases

  • Real‑time news article summarization for mobile or edge devices.
  • Batch processing of large document collections (e.g., legal briefs, research papers).
  • Pre‑processing step for downstream tasks such as question answering or information retrieval.
  • Integration into content‑management systems that need a lightweight, high‑throughput summarizer.

Benchmark Performance

For summarization models, the most relevant benchmarks are inference latency (how fast a summary can be generated) and ROUGE scores (the standard lexical overlap metric for summarization quality). The README provides a concise comparison of several DistilBART variants against the full‑size BART‑large baselines.

ModelMM ParamsInference Time (ms)SpeedupROUGE‑2ROUGE‑L
distilbart‑12‑6‑cnn3063071.24×21.2630.59
bart‑large‑cnn (baseline)4063811.00×21.0630.63
distilbart‑6‑6‑cnn2301822.09×20.1729.70
distilbart‑12‑3‑cnn2552141.78×20.5730.00

Why these numbers matter – The inference time directly translates to user‑experience latency in interactive applications (e.g., a news‑app that shows a summary as soon as the article loads). The speed‑up factor indicates how much faster the distilled model runs compared to the original BART‑large while staying within a few points of the ROUGE‑L baseline, which is often sufficient for production‑grade summarization.

Comparison to similar models – DistilBART‑CNN‑12‑6 offers a balanced trade‑off: it is slower than the smallest 6‑layer variant (2.09× speed‑up) but provides a higher ROUGE‑L (30.59 vs. 29.70). Compared to the full BART‑large, it reduces GPU memory consumption by ~25 % and cuts inference time by ~20 % while keeping ROUGE‑L within 0.04 points of the baseline.

Hardware Requirements

VRAM for inference – The model occupies roughly 1.2 GB of GPU memory when loaded in FP16 precision and ~2.4 GB in FP32. A GPU with at least 4 GB of VRAM (e.g., NVIDIA Tesla T4, RTX 3060) is sufficient for single‑sentence batch inference.

Recommended GPU specifications

  • GPU: NVIDIA RTX 2070 or newer (8 GB VRAM) for comfortable batch sizes (≤ 8 samples) and FP16 speed‑up.
  • CUDA ≥ 11.1, cuDNN ≥ 8.0 for optimal transformer kernel performance.
  • For CPU‑only inference, a modern 8‑core Xeon or AMD Ryzen 7 with ≥ 32 GB RAM can achieve ~1‑2 samples/sec, but latency will be > 1 s per article.

Storage needs – The model checkpoint (including tokenizer files) is ~1 GB in size. Store it on SSD for fast loading; a 10 GB SSD partition is more than enough for the model plus temporary cache files.

Performance characteristics – On a RTX 3060 (FP16), the model processes a 400‑word article in ~300 ms, yielding a throughput of ~3 samples/sec. The speed‑up is primarily due to the reduced number of decoder layers (6 vs. 12) and the distilled attention heads.

Use Cases

DistilBART‑CNN‑12‑6 shines in scenarios where a good balance between speed, memory footprint, and summarization quality is required.

  • News aggregators – Generate short headlines or TL;DR blocks for each article in real time.
  • Enterprise document management – Auto‑summarize contracts, policy documents, or meeting transcripts to aid quick review.
  • Customer support – Summarize long ticket histories or knowledge‑base articles for agents.
  • Educational platforms – Provide concise summaries of lecture notes or research papers for students.
  • Edge deployment – The modest VRAM requirement enables running the model on on‑device GPUs (e.g., NVIDIA Jetson) or even CPU‑only servers for low‑traffic workloads.

Training Details

Methodology – The model was first pre‑trained as a BART‑large checkpoint, then distilled using a teacher‑student framework. The student (DistilBART‑CNN‑12‑6) learns to mimic the teacher’s logits while being fine‑tuned on summarization data.

Datasets

  • CNN/DailyMail – 287 k news articles with multi‑sentence reference summaries.
  • XSum – 226 k articles with a single‑sentence “extreme” summary.

Compute requirements – Training was performed on a cluster of 8 × NVIDIA V100 GPUs (32 GB each) for roughly 48 hours. The distillation process reduces the total FLOPs by ~30 % compared to full‑size BART fine‑tuning.

Fine‑tuning capabilities – Users can further fine‑tune the model on domain‑specific corpora (e.g., medical abstracts) with the same BartForConditionalGeneration API. Recommended hyper‑parameters: learning rate ≈ 3e‑5, batch size ≈ 16 (FP16), 3‑5 epochs.

Licensing Information

The README lists the Apache‑2.0 license, which is a permissive open‑source license. However, the model card’s metadata shows “License: unknown”. In practice, the Apache‑2.0 terms apply to the code and weights released by the author.

What you can do under Apache‑2.0

  • Use the model commercially – embed it in SaaS products, mobile apps, or internal tools.
  • Modify the model or fine‑tune it on proprietary data.
  • Distribute the model (including modified versions) as long as you retain the original copyright notice and provide a copy of the license.

Restrictions & requirements

  • No warranty – the model is provided “as‑is”.
  • Must include a notice that the original work is licensed under Apache‑2.0.
  • Patents – Apache‑2.0 grants a patent‑license for contributors, which protects downstream users from patent litigation related to the contributed code.

If you intend to redistribute the model outside of the Hugging Face ecosystem, ensure you bundle the LICENSE file and the attribution notice.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives