Downloads · 30 days
97
0% of all-time downloads
Kirili4ik/mbart_ruDialogSum
mbart_ruDialogSum is a machine learning model from Kirili4ik. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc.
MBart for Russian summarization fine-tuned for dialogues summarization.
Downloads · 30 days
97
0% of all-time downloads
All-time downloads
295K
Public
Repo size
6.9 GB
Likes
26
Public
Click a slice to open those files.
.bin3.5 GB · 100%
From the Hugging Face model README
MBart for Russian summarization fine-tuned for dialogues summarization.
This model was firstly fine-tuned by Ilya Gusev on Gazeta dataset. We have fine tuned that model on SamSum dataset translated to Russian using GoogleTranslateAPI
🤗 Moreover! We have implemented a ! telegram bot @summarization_bot ! with the inference of this model. Add it to the chat and get summaries instead of dozens spam messages! 🤗
from transformers import MBartTokenizer, MBartForConditionalGeneration
# Download model and tokenizer
model_name = "Kirili4ik/mbart_ruDialogSum"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = MBartForConditionalGeneration.from_pretrained(model_name)
model.eval()
article_text = "..."
input_ids = tokenizer(
[article_text],
max_length=600,
padding="max_length",
truncation=True,
return_tensors="pt",
)["input_ids"]
output_ids = model.generate(
input_ids=input_ids,
top_k=0,
num_beams=3,
no_repeat_ngram_size=3
)[0]
summary = tokenizer.decode(output_ids, skip_special_tokens=True)
print(summary)