Loading…
Loading…
This model is a fine-tuned version of facebook/mbart-large-50-many-to-many-mmt on the TradeNewsSum dataset for multilingual abstractive summarization of foreign trade news in Russian and English.
This is a multilingual summarization model trained on economic and foreign trade news in Russian and English. It is based on the facebook/mbart-large-50-many-to-many-mmt architecture and fine-tuned specifically for the task of generating concise, informative summaries for news articles in the domain of international trade.
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
model = MBartForConditionalGeneration.from_pretrained("lyutovad/tradenewssum-mbart")
tokenizer = MBart50TokenizerFast.from_pretrained("lyutovad/tradenewssum-mbart")
text = "Ваш новостной текст здесь / Your news article goes here."
lang = "ru" # or "en"
tokenizer.src_lang = "ru_RU" if lang == "ru" else "en_XX"
inputs = tokenizer(text, return_tensors="pt", max_length=1024, truncation=True)
generated_ids = model.generate(**inputs, max_length=256, num_beams=4)
summary = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
print(summary)
As with most large language models, this model may:
Users should:
Test split of the TradeNewsSum dataset.
Evaluated separately for Russian and English subsets.
| Language | ROUGE-1 | ROUGE-2 | ROUGE-L | ROUGE-Lsum | METEOR | BERTScore-F1 | NER-F1 |
|---|---|---|---|---|---|---|---|
| ru | 0.5165 | 0.3646 | 0.5102 | 0.5093 | 0.7335 | 0.9533 | 0.707 |
| en | 0.6053 | 0.4640 | 0.5424 | 0.5427 | 0.5712 | 0.9344 | 0.643 |
ROUGE: Measures n-gram overlap between the generated summary and the reference.
METEOR: Takes into account synonyms and stemming.
BERTScore: Measures semantic similarity using contextual embeddings.
NER-F1: Measures preservation of named entities in summaries.