Downloads · 30 days
24
6% of all-time downloads
XiaHan19/mbart-large-50-extractive-conclusion
mbart-large-50-extractive-conclusion is a summarization model from XiaHan19. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as mit.
A fine-tuned mBART-large-50 model for extractive conclusion generation.
Downloads · 30 days
24
6% of all-time downloads
All-time downloads
383
Public
Parameters
611M
7.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt4.9 GB · 66%
From the Hugging Face model README
A fine-tuned mBART-large-50 model for extractive conclusion generation.
This model is fine-tuned from facebook/mbart-large-50 for the task of extracting conclusions from long-form text answers. The model learns to identify and extract the key conclusion sentences that are already present in the input text.
Given a long answer text containing reasoning steps and explanations, the model extracts the final conclusion sentence(s) that summarize the answer.
Evaluated on 100 test samples:
| Metric | Score |
|---|---|
| Exact Match | 81.0% |
| Substring Accuracy | 98.0% |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
# Load model and tokenizer
model_name = "XiaHan19/mbart-large-50-extractive-conclusion"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Prepare input
text = "Your long answer text here..."
inputs = tokenizer(text, return_tensors="pt", max_length=1024, truncation=True)
# Generate conclusion
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=256,
num_beams=4,
early_stopping=False
)
conclusion = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(conclusion)
MIT License