Potato, Dragon, Wolf, and Seven Goat

Text Generation

Stable Diffusion 2.1

GPT-2 Model Training

Chat GPT

In this project, I aim to explore the creative potential of Artificial Intelligence (AI) in storytelling by combining different models and tools. Specifically, I am using Chat GPT and GPT-2 Text Generating Model with GPU to generate two fairy tale-style stories. The idea is to combine these two stories into one and use Tracery to give it a frame.

My inspiration for this project came from the reading of “The Many Authors of The Several Houses of Brain, Spencer, Liam, Victoria, Brayden, Vincent, and Alex: Authorship, Agency, and Appropriation.“

As someone who loves fairy tales, I wanted to create a fairy tale-style story and see what kind of reaction or surprise can arise from combining the stories written by AI with those written by fairy tale experts.

Idea

My idea was to first use Chat GPT to write two fairy tale-style stories. Then, I combined these two stories into one. I used the GPT-2 Text-Generating Model to train two fairy tales stories from Grimm's Fairy Tales initially. After that, I added the story written by Chat GPT into the training process. The next step was to generate a 3000-word story. Once I had a generated story, I used Tracery to provide it with a framework. Specifically, I asked Chat GPT to help me write different sentences with the same meaning as each sentence in the generated story. Then, I used these as a word (sentence) bank for the Tracery Grammar Source. The final result was the work for this project.

Steps of Generation

  1. I asked Chat GPT to write a fairy tale-style story about a potato.

  2. I asked Chat GPT to write a fairy tale-style story about a dragon.

  3. I asked Chat GPT to combine the Potato and the Dragon stories into one story.

  4. I asked Chat GPT to revise the combined story so that the potato and dragon meet.

  5. I trained the GPT-2 model with the combined Potato and Dragon story as the dataset, starting from the base GPT-2 model, using a learning rate of 1e-4, 2000 steps, and settings to account for the most in the model's training.

  6. I also trained the GPT-2 model with the Grimm's Fairy Tales - The Wolf and Seven Kids, using a learning rate of 1e-5, 500 steps, and settings to overwrite the previously trained model and continue training from the latest checkpoint.

  7. Feeling that the story was too short, I had Chat GPT generate a story about two dragons' trip, which provided additional material to train the GPT-2 model.

  8. I trained the GPT-2 model with the Two Dragons story, using a learning rate of 1e-5, 300 steps, and settings to overwrite the previously trained model and continue training from the latest checkpoint.

  9. I also trained the GPT-2 model with the Grimm's Fairy Tales - The Wolf and Seven Kids again, using a learning rate of 1e-5, 500 steps, and settings to overwrite the previously trained model and continue training from the latest checkpoint.

  10. With the trained model ready to generate text, I set the length of the generated text to 3000 and the temperature to 0.7, using the prefix "Potato and Dragon."

  11. However, I realized that I may have trained the Potato and Dragon story for too many steps, resulting in less crazy output than desired. As a result, I decided to use Tracery to enhance the text generation.

  12. Although I initially attempted to have Chat GPT provide me with a Tracery Grammar Source based on the generated story, the length of the text proved too challenging for the model. Instead, I separated the text into sections and used OPENAI Playground to generate two additional sentences with the same meaning as each original sentence in each section.

  13. I used a Tracery grammar to combine the revised sections of text together.

  14. Additionally, I created an HTML, CSS, and JavaScript p5.js sketch that allows users to generate a random story by clicking a button. Chat GPT's ability to write sentences with the same meaning in different words helped make the article appear more logical.

Next
Next

Environment Drinks (Image Generation)