--- 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} } ```