News for hackers. Stuff that matters.
Re:GPT-3 is no longer the only game in town by zebraflask on Sunday November 07, 2021 @06:02PM (#29144427)
That is a fantastic result - nagging question - these work best on predictable things. How much of Bengali poetry is predictable?
Re:GPT-3 is no longer the only game in town by rg111 on Monday November 08, 2021 @06:05AM (#29148097)
> these work best on predictable things

Umm, not really.

You are talking about single and multi-label classification tasks, maybe?

Bengali poetry is just like poetry in any other rich languages like English, French, etc.

What these models do, from a high level, is that they learn the distribution of the data. In this case, they learn the style of the poets.

Writing poetry in specific styles has been done long before Transformer architectures came.

See-

- https://www.tensorflow.org/text/tutorials/text_generation

- https://machinelearningmastery.com/text-generation-lstm-recu...

The goal of poetry generation is to generate something that is unique, is in the poetic style, and is coherrent, grammaticallly correct, ideally indistinguishable in the eyes of a human.

Re:GPT-3 is no longer the only game in town by zebraflask on Monday November 08, 2021 @10:13AM (#29150072)
Ah, I see the distinction now, thanks.

It's an interesting subject, I think, since poetry has so many forms it can take and you need the output to capture the idiosyncratic aesthetics and "inner world" of a piece of verse.

I've actually tried using GPT-3 to generate poetry and the naive approach of just sending prompts and text snippets through the API had wildly varying results. Some pretty good, some that were basically word salad and nonsense.

But I also run a poetry journal on the side, so maybe that skews my understanding of it!

Re:GPT-3 is no longer the only game in town by rg111 on Monday November 08, 2021 @06:50PM (#29155896)
Start with LSTM or a distilled version of a language model that is trained for generation task, e.g. GPT2.

There are a lot of pretrained language models (preferably at HuggingFace Hub). Take one, and fine-tune it on a much smaller dataset.

You can then pass prompts to let this model write poetry.

I would also suggest learning the fundamentals of Deep Learning, RNNs, LSTM, Transformer, etc. Because even if you know all these, this kind of taks is not trivial.

I would use HuggingFace + PyTorch for these kind of tasks.

Besides Deep Learning knowledge, you will also need to know your way around tokenizers, controlling parameters, evaluation metrics, etc.

Having some basic understanding of poetry is helpful, but to be able to truly apply your knowledge of running your poetry journal, you will really need to be on the proverbial edge. I hope you get there, and maybe get some papers out!

Although I worked on a language model because none existed in my language, my expertise (and employment) lies in Computer Vision. So, take what I said with a grain of salt.

Re:GPT-3 is no longer the only game in town by rg111 on Tuesday November 09, 2021 @12:14PM (#29164368)
I must tell you that your intuitions are not wrong.

Many language models do predict.

In this case, they either try to predict what the next word (or character, or sub-character in case of Chinese, Japanese, etc.- this is totally the decision of the DS) is , or what some "masked" word are.

    w_i becomes w_(i-1) in the sequence
    where w_i is the last word generated
The ones that are trained to be able to predict the next word are the ones that are good generators.