Mt5 Summarize Nepali
A Nepali text summarization model fine-tuned from google/mt5-small
Downloads 21
Release Time : 7/19/2023
Model Overview
This model is specifically designed for automatic text summarization in Nepali, fine-tuned on news datasets using the MT5 architecture.
Model Features
Nepali Language Optimization
Fine-tuned specifically for Nepali linguistic characteristics, effectively handling Nepali grammar and vocabulary.
News Summarization
Trained on Nepali news datasets, particularly suitable for generating summaries of news articles.
Lightweight Model
Based on the MT5-small architecture, offering good performance with lower computational resource requirements.
Model Capabilities
Nepali Text Comprehension
Text Summarization
Long Text Compression
Use Cases
News Media
Automatic News Summarization
Generates concise summaries for Nepali news articles.
Can compress lengthy news articles into 100-250 word summaries.
Content Analysis
Document Key Information Extraction
Extracts core content from Nepali documents.
ЁЯЪА mt5-summarize-nepali
This model is a fine-tuned version of google/mt5-small on Someman/news_nepali. It solves the problem of Nepali text summarization and provides an effective solution for quickly obtaining key information from Nepali texts.
ЁЯЪА Quick Start
This model is a fine-tuned version of google/mt5-small on Someman/news_nepali. It achieves the following results on the evaluation set:
- Loss: 0.6748
ЁЯТ╗ Usage Examples
Basic Usage
>>> import torch
>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Predict with test data (first 5 rows)
>>> model_ckpt = "GenzNepal/mt5-summarize-nepali"
>>> device = "cuda" if torch.cuda.is_available() else "cpu"
>>> t5_tokenizer = AutoTokenizer.from_pretrained(model_ckpt)
>>> model = AutoModelForSeq2SeqLM.from_pretrained(model_ckpt).to(device)
>>> text = "рдХрд╛рдардорд╛рдбреМрдБ ред рд╣рд╛рд▓ рджреЗрд╢рдХреЛ рдкреВрд░реНрд╡реА рддрдерд╛ рдордзреНрдп рднреВтАУрднрд╛рдЧрдорд╛ рдордирд╕реБрдиреА рдкреНрд░рдгрд╛рд▓реАрдХреЛ рдкреНрд░рднрд╛рд╡ рд░рд╣реЗрдХреЛ рдЫ рднрдиреЗ рдмрд╛рдБрдХреА рднреВтАУрднрд╛рдЧрдорд╛ рд╕реНрдерд╛рдиреАрдп рд╡рд╛рдпреБ рд░ рдкрд╢реНрдЪрд┐рдореА рд╡рд╛рдпреБрдХреЛ рдЖрдВрд╢рд┐рдХ рдкреНрд░рднрд╛рд╡ рд░рд╣реЗрдХреЛ рдЫ ред рдпрд╕рдХрд╛ рдХрд╛рд░рдг рд╣рд╛рд▓ рдЧрдгреНрдбрдХреА рдкреНрд░рджреЗрд╢рдХрд╛ рдереЛрд░реИ рд╕реНрдерд╛рдирдорд╛ рд░ рдХрд░реНрдгрд╛рд▓реА рдкреНрд░рджреЗрд╢рдХрд╛ рдПрдХтАУрджреБрдИ рд╕реНрдерд╛рдирдорд╛ рдореЗрдШрдЧрд░реНрдЬрдирд░рдЪрдЯреНрдпрд╛рдЩрд╕рд╣рд┐рдд рд╣рд▓реНрдХрд╛рджреЗрдЦрд┐ рдордзреНрдпрдо рд╡рд░реНрд╖рд╛ рднрдЗрд░рд╣реЗрдХреЛ рдЬрд▓ рддрдерд╛ рдореМрд╕рдо рд╡рд┐рдЬреНрдЮрд╛рди рд╡рд┐рднрд╛рдЧ, рдореМрд╕рдо рдкреВрд░реНрд╡рд╛рдиреБрдорд╛рди рдорд╣рд╛рд╢рд╛рдЦрд╛рд▓реЗ рдЬрдирд╛рдПрдХреЛ рдЫ ред \
рдорд╣рд╛рд╢рд╛рдЦрдХрд╛ рдореМрдорд╕рд╡рд┐рджреН рд░реЛрдЬрд▓ рд▓рд╛рдорд┐рдЫрд╛рдиреЗрдХрд╛ рдЕрдиреБрд╕рд╛рд░ рдкрдЫрд┐рд▓реНрд▓реЛ рддреАрди рдШрдиреНрдЯрд╛рдорд╛ рдЧрдгреНрдбрдХреА рдкреНрд░рджреЗрд╢рдХрд╛ рдереЛрд░реИ рд╕реНрдерд╛рди, рдмрд╛рдЧрдорддреА рдкреНрд░рджреЗрд╢рдХрд╛ рдПрдХтАУрджреБрдИ рд╕реНрдерд╛рдирдорд╛ рд╣рд▓реНрдХрд╛рджреЗрдЦрд┐ рдордзреНрдпрдо рд╡рд░реНрд╖рд╛ рднрдЗрд░рд╣реЗрдХреЛ рдЫ ред рдХрд╛рдардорд╛рдбреМрдБ рдЙрдкрддреНрдпрдХрд╛рд╕рд╣рд┐рдд рдмрд╛рдЧрдорддреА рдкреНрд░рджреЗрд╢рдорд╛ рд░рд╛рддрд┐рдХреЛ рд╕рдордпрдорд╛ рд╡рд░реНрд╖рд╛рдХреЛ рд╕рдореНрднрд╛рд╡рдирд╛ рд░рд╣реЗрдХреЛ рдЫ ред рдпрд╕реНрддреИ рдХреЛрд╢реА рдкреНрд░рджреЗрд╢, рдордзреЗрд╢ рдкреНрд░рджреЗрд╢ рд░ рджреЗрд╢рдХрд╛ рдкрд╣рд╛рдбреА рднреВтАУрднрд╛рдЧрдорд╛ рдмрджрд▓реА рд░рд╣рдиреБрдХрд╛ рд╕рд╛рдереИ рд╣рд▓реНрдХрд╛ рд╡рд░реНрд╖рд╛рдХреЛ рд╕рдореНрднрд╛рд╡рдирд╛ рд░рд╣реЗрдХреЛ рдорд╣рд╛рд╢рд╛рдЦрд╛рд▓реЗ рдЙрд▓реНрд▓реЗрдЦ рдЧрд░реЗрдХреЛ рдЫ ред \
рдореМрд╕рдорд╡рд┐рджреН рд▓рд╛рдорд┐рдЫрд╛рдиреЗрд▓реЗ рдордирд╕реБрди рдкреНрд░рдгрд╛рд▓реА рдХреНрд░рдорд┐рдХрд░реВрдкрдорд╛ рджреЗрд╢рднрд░ рдлреИрд▓рд┐рдиреЗ рдХреНрд░рдордорд╛ рд░рд╣реЗрдХреЛ рд░ рдпреЛ рджреЗрд╢рднрд░ рд╡рд┐рд╕реНрддрд╛рд░ рд╣реБрди рдЕрдЭреИ рдПрдХ рд╕рд╛рддрд╛ рд▓рд╛рдЧреНрдиреЗ рдмрддрд╛рдП ред рдЧрдд рдЬреЗрда рейрез рдЧрддреЗ рдмреБрдзрдмрд╛рд░ рдиреЗрдкрд╛рд▓рдХреЛ рдкреВрд░реНрд╡реА рднреЗрдЧ рднрдПрд░ рдордирд╕реБрди рдкреНрд░рдгрд╛рд▓реА рднрд┐рддреНрд░рд┐рдПрдХреЛ рдерд┐рдпреЛ ред рдордирд╕реБрди рд╕реБрд╕реНрддрдЧрддрд┐рдорд╛ рд░рд╣реЗрдХрд╛рд▓реЗ рджреЗрд╢рдХреЛ рдкрд╢реНрдЪрд┐рдо рдХреНрд╖реЗрддреНрд░рдорд╛ рдлреИрд▓рд┐рди рдХреЗрд╣реА рджрд┐рди рд▓рд╛рдЧреНрдиреЗ рдЬрдирд╛рдЗрдПрдХреЛ рдЫ ред"
>>> inputs = t5_tokenizer(text, return_tensors="pt", max_length=1024, padding= "max_length", truncation=True, add_special_tokens=True)
>>> generation = model.generate(
input_ids = inputs['input_ids'].to(device),
attention_mask=inputs['attention_mask'].to(device),
num_beams=6,
num_return_sequences=1,
no_repeat_ngram_size=2,
repetition_penalty=1.0,
min_length=100,
max_length=250,
length_penalty=2.0,
early_stopping=True
)
# # Convert id tokens to text
>>> output = t5_tokenizer.decode(generation[0], skip_special_tokens=True, clean_up_tokenization_spaces=True)
>>> print(output)
"рд╣рд╛рд▓ рджреЗрд╢рдХреЛ рдкреВрд░реНрд╡реА рддрдерд╛ рдордзреНрдп рднреВтАУрднрд╛рдЧрдорд╛ рдордирд╕реБрдиреА рдкреНрд░рдгрд╛рд▓реАрдХреЛ рдкреНрд░рднрд╛рд╡ рд░рд╣реЗрдХреЛ рдЫ ред рдмрд╛рдБрдХреА рднреВрднрд╛рдЧрд╣рд░реВрдорд╛ рд╕реНрдерд╛рдиреАрдп рд╡рд╛рдпреБ рд░ рдкрд╢реНрдЪрд┐рдореА рд╡рд╛рдпреБрдХреЛ рдЖрдВрд╢рд┐рдХ рд╕рдЩреНрдХреНрд░рдордг рдЫред рдЧрдд рд╡реИрд╢рд╛рдЦ рейрез рдЧрддреЗ рдмреБрдзрдмрд╛рд░ рдиреЗрдкрд╛рд▓рдХреЛ рднреЗрдЧ рднрдПрд░ рдордирд╕реБрди рдкреНрд░рдгрд╛рд▓реА рднрд┐рддреНрд░рд┐рдПрдХреЛ рдерд┐рдпреЛ рднрдиреЗ рд╣рд▓реНрдХрд╛рджреЗрдЦрд┐ рдордзреНрдпрдо рд╡рд░реНрд╖рд╛ рднрдЗрд░рд╣реЗрдХреЛ рдЬрдирд╛рдЗрдПрдХреЛ рдЫ рднрдиреЗ рдореМрд╕рдорд╡рд┐рджреН рд▓рд╛рдорд┐рдЫрд╛рдиреЗрд▓реЗ рдЙрд▓реНрд▓реЗрдЦ рдЧрд░реЗрдХрд╛ рдЫрдиреН рднрдиреЗ рдпреЛ рджреЗрд╢рднрд░ рд╡рд┐рд╕реНрддрд╛рд░ рд╣реБрди рдЕрдЭреИ рдПрдХ рд╕рд╛рддрд╛ рд▓рд╛рдЧреНрдиреЗрдЫред
"
ЁЯУЪ Documentation
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0005
- train_batch_size: 2
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 90
- num_epochs: 10
Training results
Training Loss | Epoch | Step | Validation Loss |
---|---|---|---|
0.7762 | 2.72 | 2500 | 0.7255 |
0.6377 | 5.44 | 5000 | 0.6947 |
0.5674 | 8.15 | 7500 | 0.6748 |
Framework versions
- Transformers 4.30.1
- Pytorch 2.0.0
- Datasets 2.1.0
- Tokenizers 0.13.3
ЁЯУД License
This project is licensed under the Apache-2.0 license.
Bart Large Cnn
MIT
BART model pre-trained on English corpus, specifically fine-tuned for the CNN/Daily Mail dataset, suitable for text summarization tasks
Text Generation English
B
facebook
3.8M
1,364
Parrot Paraphraser On T5
Parrot is a T5-based paraphrasing framework designed to accelerate the training of Natural Language Understanding (NLU) models through high-quality paraphrase generation for data augmentation.
Text Generation
Transformers

P
prithivida
910.07k
152
Distilbart Cnn 12 6
Apache-2.0
DistilBART is a distilled version of the BART model, specifically optimized for text summarization tasks, significantly improving inference speed while maintaining high performance.
Text Generation English
D
sshleifer
783.96k
278
T5 Base Summarization Claim Extractor
A T5-based model specialized in extracting atomic claims from summary texts, serving as a key component in summary factuality assessment pipelines.
Text Generation
Transformers English

T
Babelscape
666.36k
9
Unieval Sum
UniEval is a unified multidimensional evaluator for automatic evaluation of natural language generation tasks, supporting assessment across multiple interpretable dimensions.
Text Generation
Transformers

U
MingZhong
318.08k
3
Pegasus Paraphrase
Apache-2.0
A text paraphrasing model fine-tuned based on the PEGASUS architecture, capable of generating sentences with the same meaning but different expressions.
Text Generation
Transformers English

P
tuner007
209.03k
185
T5 Base Korean Summarization
This is a Korean text summarization model based on the T5 architecture, specifically designed for Korean text summarization tasks. It is trained on multiple Korean datasets by fine-tuning the paust/pko-t5-base model.
Text Generation
Transformers Korean

T
eenzeenee
148.32k
25
Pegasus Xsum
PEGASUS is a Transformer-based pretrained model specifically designed for abstractive text summarization tasks.
Text Generation English
P
google
144.72k
198
Bart Large Cnn Samsum
MIT
A dialogue summarization model based on the BART-large architecture, fine-tuned specifically for the SAMSum corpus, suitable for generating dialogue summaries.
Text Generation
Transformers English

B
philschmid
141.28k
258
Kobart Summarization
MIT
A Korean text summarization model based on the KoBART architecture, capable of generating concise summaries of Korean news articles.
Text Generation
Transformers Korean

K
gogamza
119.18k
12
Featured Recommended AI Models
┬й 2025AIbase