Downloads · 30 days
14
27% of all-time downloads
MrLeo0087/paragraph_summarizer
paragraph_summarizer is a machine learning model from MrLeo0087. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of facebook/bart-large-cnn on the DialogSum dataset. It is specifically designed to summarize multi-turn dialogues into concise, third-person summaries.
Downloads · 30 days
14
27% of all-time downloads
All-time downloads
52
Public
Parameters
406M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.6 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of facebook/bart-large-cnn on the DialogSum dataset. It is specifically designed to summarize multi-turn dialogues into concise, third-person summaries.
While the base bart-large-cnn model is trained on news articles (CNN/Daily Mail), this version is specialized for conversational text . It understands speaker transitions and can synthesize chat history into a coherent paragraph.
You can use this model directly with the Hugging Face pipeline:
Python
import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
# 1. SETUP
model_path = r"C:\Users\sator\Downloads\sumary\model"
print("Loading model and tokenizer...")
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
def pred_strict(text_to_summarize):
inputs = tokenizer(
text_to_summarize,
return_tensors="pt",
truncation=True,
max_length=1022
)
with torch.no_grad():
summary_ids = model.generate(
inputs["input_ids"],
max_length=150,
min_length=70,
num_beams=6,
length_penalty=0.8,
no_repeat_ngram_size=3,
repetition_penalty=2.0,
early_stopping=True
)
return tokenizer.decode(summary_ids[0], skip_special_tokens=True)
long_transcript = """
Your Paragraph
"""
print("\n" + "="*40)
print("GENERATED SUMMARY")
print("="*40)
try:
print(pred_strict(long_transcript))
except Exception as e:
print(f"An error occurred: {e}")
The following hyperparameters were used during training:
betas=(0.9, 0.999) and epsilon=1e-08Github : Click
Facebook : Click
Instagram : Click
Linkedin : Click