Text Summarization Pipeline (FLAN-T5)
A production-grade abstractive text summarization model and MLOps pipeline developed by Ruthvik. Powered by Google's FLAN-T5, optimized for fast CPU and cloud inference.
Model Details
- Architecture: Seq2SeqLM (T5 / FLAN-T5)
- Base Model:
google/flan-t5-small(77M parameters) - Task: Abstractive Text Summarization
- Max Input Tokens: 2048 (with recursive chunking & hierarchical synthesis)
- Recommended Output Length: 40 - 150 words
Quickstart / Python Inference
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
repo_id = "RUTHVIK82/text-summarization-pipeline"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)
text = "Summarize: Artificial intelligence and deep learning have revolutionized modern software development, enabling models to generate human quality text, translate languages, and perform complex reasoning tasks with remarkable speed."
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True)
summary_ids = model.generate(inputs["input_ids"], max_length=150, min_length=20, num_beams=2)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print("Generated Summary:", summary)
Features
- Intelligent Chunking Engine: Recursively splits large articles and synthesizes multi-section summaries without context overflows.
- Continuous MLOps Pipeline: Integrated with DVC for dataset versioning and MLflow for run/metric tracking.
- Production Dashboard: Beautiful Liquid Glass React UI with real-time metrics, ROUGE scores, and interactive REST APIs.