bart large cnn

facebook

Introduction

The BART (Bidirectional and Auto-Regressive Transformers) large-sized model, fine-tuned on the CNN/Daily Mail dataset, is designed for natural language generation, including summarization tasks. It combines a BERT-like encoder with a GPT-like decoder, effectively handling text reconstruction tasks. This model was introduced in the paper "BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension" by Lewis et al.

Architecture

BART is a sequence-to-sequence transformer model that consists of a bidirectional encoder and an autoregressive decoder. The model is pre-trained by corrupting text with a noising function and then learning to reconstruct the original text. This architecture is particularly suited for tasks that require text generation, such as summarization and translation, and also performs well in comprehension tasks.

Training

The BART model has been fine-tuned on the CNN/Daily Mail dataset, which is a large collection of text-summary pairs. The model achieves notable results using ROUGE metrics, such as ROUGE-1, ROUGE-2, ROUGE-L, and ROUGE-LSUM, with verified metric scores indicating effective summarization capabilities.

Guide: Running Locally

To use the BART model for summarization, follow these steps:

  1. Install Transformers Library:

    pip install transformers
    
  2. Use the Model with Pipeline API:

    from transformers import pipeline
    
    summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
    ARTICLE = """[Your article text here]"""
    summary = summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False)
    print(summary)
    
  3. Cloud GPUs: For better performance, especially with large datasets, consider using cloud GPU services like AWS, Google Cloud, or Azure to run the model efficiently.

License

The BART large model is released under the MIT License, allowing for wide usage with minimal restrictions.

More Related APIs in Summarization