AML Text Summarization T5 Model

This is a text summarization model based on the T5-Small architecture, developed as part of the Advanced Machine Learning course at the University of Bremen.

Model Description

This model is fine-tuned on the CNN/Daily Mail dataset for abstractive text summarization. It uses the T5-Small (Text-To-Text Transfer Transformer) architecture.

Usage

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("s0urin/aml-text-summarization-t5")
model = AutoModelForSeq2SeqLM.from_pretrained("s0urin/aml-text-summarization-t5")

text = "Your long text here..."
inputs = tokenizer("summarize: " + text, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(inputs.input_ids, max_length=150, min_length=40, length_penalty=2.0, num_beams=4, early_stopping=True)
summary = tokenizer.decode(outputs, skip_special_tokens=True)

print(summary)

Authors

  • Sourin Kumar Pal
  • Jassim Hameed Ayobkhan
Downloads last month
10
Safetensors
Model size
60.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for s0urin/aml-text-summarization-t5

Base model

google-t5/t5-small
Finetuned
(1798)
this model

Dataset used to train s0urin/aml-text-summarization-t5