pegasus large

google

Introduction

PEGASUS is a Transformer-based model designed for abstractive text summarization. Developed by Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter J. Liu, PEGASUS employs pre-training with extracted gap-sentences, making it effective for summarization tasks across various datasets. The model is available in different configurations, including "Mixed & Stochastic," which offers enhancements for improved performance.

Architecture

PEGASUS utilizes a Transformer architecture optimized for summarization tasks. It introduces the concept of gap-sentence generation, where important sentences are selected and used for training. The model is trained on diverse datasets like C4 and HugeNews, using a combination of sampled gap sentence ratios and uniform noise to refine sentence importance scores. This approach enhances the model's ability to summarize complex documents accurately.

Training

The "Mixed & Stochastic" version of PEGASUS is trained on both C4 and HugeNews datasets, weighted by their example count. Training extends to 1.5 million steps, allowing for better convergence in pretraining perplexity. Key features include sampling gap sentence ratios between 15% and 45% and encoding newline characters in the tokenizer. The model also applies a 20% uniform noise to importance scores during sentence selection.

Guide: Running Locally

To run PEGASUS locally, follow these steps:

  1. Install Dependencies: Ensure Python and frameworks like PyTorch or TensorFlow are installed.
  2. Clone Repository: Download the PEGASUS repository from Hugging Face.
  3. Load the Model: Use the transformers library to load the PEGASUS model and tokenizer.
  4. Input Text for Summarization: Prepare your text data and run it through the model.
  5. Retrieve Output: Collect and process the summarized text.

For optimal performance, using cloud GPUs from providers like AWS or Google Cloud is recommended, especially for large datasets or batch processing.

License

PEGASUS is released under an open-source license. For specific licensing details, refer to the original GitHub repository or the Hugging Face documentation.

More Related APIs in Summarization