Aug 07, 2023
I had a weird idea the other day: what if I trained an AI text generator on my own writing? What would it produce? The idea kept nagging at me until this weekend I finally had a free couple of hours and dug in. I used a python package I found on Github called gpt_2_simple by a guy named Max Woolf.
It is described as: "A simple Python package that wraps existing model fine-tuning and generation scripts for OpenAI's GPT-2 text generation model."
The setup is pretty easy and is fully documented in the README. Once I had it installed, I converted the three books in my Justin Vincent series to plain text and fed them to the AI. I let it run for about 1.5 hours (320 training passes) on my M2 Macbook Pro. I'm not really sure how log it would have kept going if I just let it run but I felt like that was long enough to get some kind of decent result.
I have to admit, the result is kind of eerie. It's almost like the writing came from my own brain but a psychotic version of me that can only write vague esoteric nonsense. Here are a couple of excerpts:
I stepped onto the roof and stood in front of the painting. It was a starkly different looking version than the one I had seen at the gallery. And it had a different color scheme.
I looked down the hall. A woman in a black bomber jacket and black cargo pants stood in the lobby. She motioned for me to wait until she could approach.
I waited an hour. A light bulb lit up in my room. A couple of minutes later, a woman came in and sat next to a big blue velvet chair. She looked tired and frail, pale skin with a thin, heavy forehead. I could tell she was waiting for something. I stepped forward and looked at the painting. It was a little over a thousand years old. I could almost see the golden age coloring--a golden age before we started. The golden age was the moment when art began to fade away into the background. Art would continue to fade but the golden age would last for years to come.
We walked a circuit of tunnels, caverns, and big old steel bunkers. We passed an oil slick, a freeway, and a highway that curved around it. A blip on the map meant the end of civilization.
“So what’s next?” I asked.
“Nothing,” Ashna answered, looking down at the bridge over the Thames. “Nothing. Just a boring job.”
She climbed a rope ladder and lowered it to a stand, holding it up with one hand.
“I’ll keep you posted.”
I climbed over the wall and dropped down onto the open field. The steam from the blast furnace was a dull roar. The earth beneath me spun and a dull sound like a chime echoed through the trees.
“I’ll do my best,” I said, rolling onto my side and heading for the pool.
It's like a creepy AI oracle predicting its own ascendance. "The golden age was the moment when art began to fade away into the background..." I'm kind of afraid of it but not enough to stop experimenting. I'm going to keep working on this and see how far I can take it. Can I get it to write a whole book in my own style?