File size: 4,303 Bytes
0188a46
 
 
 
 
09503c9
0188a46
a737a25
0188a46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
license: mit
language:
- ru
tags:
  - natural-language-processing
  - poetry-generation
  - text-generation
  - torch
  - lstm
---

This model was trained using [Andrej Karpathy's code](https://github.com/karpathy/char-rnn) on texts by the Russian poet Osip Mandelstam. Models of this type well represent individual poetic style.

Model was trained with size 512 and 7 layers, dropout 0.5.

There are 2 checkpoints of this model presented in the repository. One after 28 epochs with loss 1.0705, the other after 50 epochs with loss 1.1207. These metrics are in the file name.

## Usage

The procedure for installing the required software is described [by Karpathy](https://github.com/karpathy/char-rnn), torch is required, the code is written in lua. Be careful, versions of libraries written many years ago are used.

```bash
th sample.lua lm_lstm_epoch50.00_1.1207.t7
```

## Train data

Train data is free and inclded in this repository as `input.txt` file.

## What for?

In an era of winning Transformers, ancient RNN models seem archaic. But I see that they still work better than modern architectures with such important categories from the humanities point of view as poetic style.

## Publication

The texts that produced this model were used in [an experiment](https://arxiv.org/abs/2306.02771) to define poetic style.


## Samples

### epoch 28.4, loss 1.0705, temperature 0.3

```
Слитко мне поднял в нем,
И в легкий день подобились в облака
И не запахнут в долгом оберений подводка.

И поднимал в дома и поднимали,
И в крепкой просторной каменный подражник
В нас над небесах и в полной белой колесе
И переставил колоколенной города.

И в подвождей светлой городов подвитает
И воздух воздуха не полупростить
И как поднимал и воды пробежала,
И весь на полночной домой.
```

### epoch 28.4,_loss 1.0705,_temperature 0.6

```
Поднять в еденный воздух над город.

И потремен от крепкой закони,
Как в небе меня мое осенницы,
И дон на мелькает подворонного кого,
И задыхаешь мы удалой
И светло передуха себя,
И соломинка могла из моряю
Не замечательно ложить,
В себя над ожерады и коленей.
```

### epoch 50.0,_loss 1.1207,_temperature 0.5

```
И в небе невой подорогах запорова,
Прополнить без тебе не волна,
Как же бесконечного морщинах,
И слабой солнце полноводная стекла.

Не ужасные пламенное слово
Слово в советском судия звездами крепкой нам он в муревях облаков,
Сказал твой бедного замереть --
И не видно морской неловко!
```

### epoch 50.0,_loss 1.1207,_temperature 0.7

```
Как в избежал созданий вин.

В столках небесах от зазнаванья намеженье.
А в бах колесо в извратной сиянье,
Но не слушают горький песок,
Единый под куполом громом,
И под бесполесной полубежают запым.
На мире не мог быстро музыки,
Любовью высокой двойней,
Когда б моей сердце, ни слазах полноводная видать.
Все царственный там -- ее не выпалы
И пророческой крестьянские простороном,
И клена мечта на кротких глаз.
```

## BibTeX entry and citation info

```
@misc{orekhov2023identifying,
      title={Identifying the style by a qualified reader on a short fragment of generated poetry}, 
      author={Boris Orekhov},
      year={2023},
      eprint={2306.02771},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
```