CoolFace
Modelpublic

harsharajkumar273/T5-Base-Summarization

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes
Model Card

T5-Base-Summarization

A fine-tuned version of t5-base for summarizing research papers into concise summaries. This is the first stage of a two-step Research Paper Simplifier pipeline.

Model Description

This model takes a section of a research paper as input and generates a plain-language summary approximately 1/10th the length of the original text. Fine-tuned using LoRA (PEFT) for parameter-efficient training.

Pipeline

Research Paper ──► [T5-Base-Summarization] ──► Summary ──► [T5-Base-Story-Generation] ──► Story

Training Details

ParameterValue
Base modelt5-base
TaskSummarization
Max input length1024 tokens
Max target length128 tokens
Learning rate3e-5
Batch size4
Gradient accumulation steps4
Warmup steps500
Weight decay0.01
Fine-tuning methodLoRA (r=16, alpha=32, targets: q, v)

Usage

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("harsharajkumar273/T5-Base-Summarization")
model = AutoModelForSeq2SeqLM.from_pretrained("harsharajkumar273/T5-Base-Summarization")

text = "Your research paper section here..."
word_count = len(text.split())
prompt = f"Summarize this part of the research paper to less than {word_count // 10} words:\n{text}"

inputs = tokenizer(prompt, return_tensors="pt", max_length=1024, truncation=True)
outputs = model.generate(**inputs, max_length=128, num_beams=4)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(summary)

Evaluation Metrics

Evaluated using ROUGE and BERTScore on a held-out 10% test split.

Related Models