File size: 2,095 Bytes
4ede9d3
 
dd7dd1a
 
 
 
 
 
 
 
 
 
4ede9d3
 
 
 
78330ba
4ede9d3
 
 
 
 
1ac3fa0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ede9d3
 
 
d847bf6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
library_name: transformers
tags:
- text-generation
- turkish
- gpt2
license: apache-2.0
language:
- tr
base_model:
- ytu-ce-cosmos/turkish-gpt2-large
pipeline_tag: text-generation
---

# Model Card for Model ID

This model is a fine-tuned version of [ytu-ce-cosmos/turkish-gpt2-large](https://huggingface.co/ytu-ce-cosmos/turkish-gpt2-large), trained on 100,000 Turkish poems. It specializes in generating poetry in Turkish with fluency and coherence.

## How to Get Started with the Model

Use the code below to get started with the model.

```python

from transformers import pipeline, AutoTokenizer, GPT2LMHeadModel

model = GPT2LMHeadModel.from_pretrained("yeniguno/gpt2-turkish-poem-generator")
tokenizer = AutoTokenizer.from_pretrained("yeniguno/gpt2-turkish-poem-generator")

text_generator = pipeline('text-generation', model=model, tokenizer=tokenizer)

response = text_generator("Dağ başındasın, ", max_length=100)

print(f"\nRESPONSE\n{response}")
"""
RESPONSE
[{'generated_text': 'Dağ başındasın, uçar peşinde. Bir düştün şu garip dünyaya. Girdin sen de dünyamı başıma. Hiç acımadın bu genç yaşa. Uçtun, tozdun, bir başına. Sen de bir çocuk olmuştun. Ağlıyordun, o dünyada. Gel, gör bir de gör, ne olmuşsun. Yaşamak, düşlemek ne olmuşsun. Gel, gör bu genç yaşta ne olmuşsun.\nUçmayı, dağlarda gezmeyi düşlüyordun, Uçmak, ağaçlarda'}]
"""
```

## Training Details

## Training Details
- **Training Dataset:** 100K Turkish poems from diverse sources.
- **Tokenizer:** Inherited from `turkish-gpt2-large`.
- **Training Steps:** 18,714
- **Epochs:** 3
- **Optimizer:** AdamW

### Loss Metrics
| Epoch | Training Loss | Validation Loss |
|-------|--------------|----------------|
| 1     | 3.9527       | 3.8496         |
| 2     | 3.6406       | 3.7984         |
| 3     | 3.3847       | 3.7995         |

### Final Training Metrics
- **Global Steps:** 18,714
- **Final Training Loss:** 3.6842
- **Train Runtime:** 15,003s (~4.2 hours)
- **Samples per Second:** 19.96
- **Steps per Second:** 1.25
- **Total FLOPs:** 6.52 × 10¹⁷