Summarization
Transformers
Safetensors
PyTorch
English
t5
text2text-generation
dialogue-summarization
flan-t5
huggingface
text-generation-inference
Instructions to use Ayush5605/dialogue-summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ayush5605/dialogue-summarizer with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="Ayush5605/dialogue-summarizer")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Ayush5605/dialogue-summarizer") model = AutoModelForSeq2SeqLM.from_pretrained("Ayush5605/dialogue-summarizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
π Dialogue Summarizer using FLAN-T5
This model is a fine-tuned version of google/flan-t5-base (replace with flan-t5-small if that's what you used) for the task of dialogue summarization. It generates concise summaries from conversational dialogues while preserving the key information.
π Model Details
- Base Model: google/flan-t5-base
- Task: Dialogue Summarization
- Framework: PyTorch
- Library: Hugging Face Transformers
- Fine-tuning Dataset: SAMSum Dialogue Summarization Dataset
π Dataset
The model was fine-tuned on the SAMSum Dataset, which contains messenger-style conversations paired with human-written summaries.
Example:
Input Dialogue
Amanda: Are we still meeting tomorrow?
Jerry: Yes, let's meet at 10 AM.
Amanda: Perfect. See you then!
Generated Summary
Amanda and Jerry confirm their meeting for tomorrow at 10 AM.
π§ Training Details
- Epochs: 10
- Batch Size: 8
- Weight Decay: 0.01
- Warmup Steps: 500
- Optimizer: AdamW (Transformers default)
- Maximum Input Length: 512 tokens
- Maximum Summary Length: 150 tokens
π» Usage
Install dependencies:
pip install transformers torch
Load the model:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "Ayush5605/dialogue-summarizer"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
Generate a summary:
dialogue = """
Amanda: Are we still meeting tomorrow?
Jerry: Yes, let's meet at 10 AM.
Amanda: Perfect. See you then!
"""
inputs = tokenizer(
dialogue,
return_tensors="pt",
max_length=512,
truncation=True
)
summary_ids = model.generate(
**inputs,
max_length=150,
num_beams=4,
early_stopping=True
)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(summary)
π Intended Use
This model is intended for:
- Dialogue summarization
- Chat transcript summarization
- Meeting summarization
- Customer support conversation summarization
- Educational and research purposes
β οΈ Limitations
- Performance depends on the quality and style of the input dialogue.
- Very long conversations (>512 tokens) are truncated.
- The model may omit minor conversational details while generating concise summaries.
- It has been fine-tuned primarily on English dialogue data.
π Training Framework
- Python
- PyTorch
- Hugging Face Transformers
- Hugging Face Datasets
π¨βπ» Author
Ayush Auti
- GitHub: https://github.com/Ayush5605
- Hugging Face: https://huggingface.co/Ayush5605
π Citation
If you use this model in your work, please cite the original FLAN-T5 paper and the SAMSum dataset.
@article{flan2022,
title={Scaling Instruction-Finetuned Language Models},
author={Chung, Hyung Won and others},
year={2022}
}
@inproceedings{samsum,
title={SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization},
author={Gliwa et al.},
year={2019}
}
- Downloads last month
- 23