🚀 Turkish Abstractive Summarization Model
This model is a fine - tuned version of mukayese/mt5 - base - turkish - summarization
, designed to generate concise and coherent summaries of Turkish news articles. It was fine - tuned on the yeniguno/turkish - news - summary - onesentence
dataset, which helps enhance the model's ability to create shorter and more compact news summaries.
🚀 Quick Start
Use the following code to start using the model:
from transformers import pipeline
pipe = pipeline("summarization", model="yeniguno/turkish-abstractive-summary-mt5")
text = """Brezilya'nın kuzeydoğu kıyısındaki Recife kentinde yangın çıkan bir gökdelen alevlere teslim oldu. Paylaşılan video kaydında, binayı alt katlarından üst katlarına kadar alevlerin sardığı görüldü. İlk belirlemelere göre ölen ya da yaralanan olmadı. Timesnow'ın haberine göre, binadan molozlar düşmesi nedeniyle civardaki binaların elektriği kesildi ve binalar tahliye edildi."""
response = pipe(
text,
max_length=150,
num_beams=4,
length_penalty=3.0,
early_stopping=True
)
print(response[0]["summary_text"])
✨ Features
This model is suitable for applications that need to summarize Turkish news content. It can be used on news aggregation platforms, content curation services, and other applications that aim to provide quick overviews of long news articles.
📦 Installation
No specific installation steps are provided in the original document, so this section is skipped.
💻 Usage Examples
Basic Usage
from transformers import pipeline
pipe = pipeline("summarization", model="yeniguno/turkish-abstractive-summary-mt5")
text = """Brezilya'nın kuzeydoğu kıyısındaki Recife kentinde yangın çıkan bir gökdelen alevlere teslim oldu. Paylaşılan video kaydında, binayı alt katlarından üst katlarına kadar alevlerin sardığı görüldü. İlk belirlemelere göre ölen ya da yaralanan olmadı. Timesnow'ın haberine göre, binadan molozlar düşmesi nedeniyle civardaki binaların elektriği kesildi ve binalar tahliye edildi."""
response = pipe(
text,
max_length=150,
num_beams=4,
length_penalty=3.0,
early_stopping=True
)
print(response[0]["summary_text"])
Advanced Usage
from transformers import pipeline
pipe = pipeline("summarization", model="yeniguno/turkish-abstractive-summary-mt5")
text = """Some long Turkish news text here"""
response = pipe(
text,
max_length=200,
num_beams=6,
length_penalty=2.0,
early_stopping=True
)
print(response[0]["summary_text"])
📚 Documentation
Uses
This model is intended for applications requiring the summarization of Turkish news content, such as news aggregation platforms, content curation services, and applications aiming to provide quick overviews of lengthy news articles.
Bias, Risks, and Limitations
The model's performance depends on the quality and diversity of the training data. It may not perform optimally on news topics or styles not represented in the training dataset. Users should be cautious and consider the context when interpreting the generated summaries.
🔧 Technical Details
Training Data
The model was fine - tuned on the yeniguno/turkish - news - summary - onesentence
dataset, which contains approximately 60,000 Turkish news articles paired with one - sentence summaries.
Training Procedure
The model was fine - tuned using mukayese/mt5 - base - turkish - summarization
on the yeniguno/turkish - news - summary - onesentence
dataset. The training was conducted using Hugging Face's transformers
library with the following hyperparameters:
Property |
Details |
Learning Rate |
5e-6 |
Batch Size |
8 per device for both training and evaluation |
Weight Decay |
0.01 |
Epochs |
10 |
Evaluation Strategy |
epoch (evaluated at the end of each epoch) |
Loss Function |
Cross - entropy loss |
Optimizer |
AdamW |
Training Steps |
49,560 |
Total FLOPs |
7.78e+17 |
Predict with Generate |
Enabled |
The fine - tuning process was conducted on a single GPU, with dynamic padding applied using the DataCollatorForSeq2Seq
.
Evaluation
To evaluate the model's performance, ROUGE scores were used. The following metrics were calculated on the validation set at the end of each epoch:
Epoch |
Training Loss |
Validation Loss |
ROUGE - 1 |
ROUGE - 2 |
ROUGE - L |
Gen Len |
1 |
1.3854 |
1.2058 |
35.10 |
22.95 |
31.92 |
8.86 |
2 |
1.2895 |
1.1541 |
36.27 |
24.05 |
33.05 |
8.87 |
3 |
1.2631 |
1.1258 |
36.58 |
24.55 |
33.41 |
8.85 |
4 |
1.2318 |
1.1072 |
36.98 |
24.95 |
33.80 |
8.84 |
5 |
1.2130 |
1.0946 |
37.17 |
25.18 |
34.01 |
8.83 |
6 |
1.1948 |
1.0861 |
37.38 |
25.41 |
34.22 |
8.83 |
7 |
1.1888 |
1.0803 |
37.56 |
25.60 |
34.39 |
8.83 |
8 |
1.1810 |
1.0764 |
37.58 |
25.63 |
34.41 |
8.84 |
9 |
1.1690 |
1.0738 |
37.68 |
25.74 |
34.52 |
8.83 |
10 |
1.1814 |
1.0732 |
37.68 |
25.73 |
34.52 |
8.84 |
- ROUGE - 1: Measures the overlap of unigrams between generated summaries and reference summaries.
- ROUGE - 2: Measures the overlap of bigrams.
- ROUGE - L: Measures the longest common subsequence between reference and generated summaries.
- Gen Len: Represents the average length of generated summaries.
After 10 epochs, the model achieved ROUGE - 1: 37.68, ROUGE - 2: 25.73, ROUGE - L: 34.52 on the validation dataset, indicating improved summarization capabilities. At the end of training, the final training loss was 1.2444, with the last recorded validation loss of 1.0732. The model was optimized to generate more concise and compact Turkish news summaries while maintaining high semantic accuracy and readability.
📄 License
This model is licensed under the Apache - 2.0 license.