8000 GitHub - metopedia/wrAIter: AI writing assistant with a voiced narrator
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

metopedia/wrAIter

 
 

Repository files navigation

wrAIter is a voiced AI that writes stories while letting the user interact and add to the story. You can write a paragraph, let the AI write the next one, you add another, etc. Or you can enable "choice mode" and let the AI make suggestions you can pick from for each paragraph.

The AI writer is powered by EleitherAI's GPT-NEO model, a replication of GPT-3. The suggested model has 2.7 billion parameters and was fine-tuned to write light novels.

Features

  • State-of-the-art Artificial Intelligence fine-tuned for the specific purpose of writing stories,
  • A high quality narrator AI that reads the story out loud (TTS)**,
  • Two modes to build a story: alternating AI-human writing or choosing from AI generated options,
  • Save, load, continue and revert functions,
  • Randomly generated or custom prompts to start new stories.

Local Installation

  1. (Optional) Set up CUDA 11.1 to enable hardware acceleration if your GPU can take it.
  2. Install python 3.7, Visual C++ 14.0 (or later) and eSpeak-ng.
  3. Set the PHONEMIZER_ESPEAK_PATH environment variable to C:\Program Files\eSpeak NG\espeak-ng.exe or wherever you installed it.
  4. Download or clone this repository.
  5. Run install.ps1 (windows powershell) or install.sh (shell script).
  6. Download a GPT-NEO model and put its content in ./models/[model name]/. Here's a link to finetuneanon's light novel model.
  7. Play by running play.ps1 (windows powershell) or play.sh (shell script). You can also launch main.py directly with your own launch options (model selection, gpu/cpu).

FAQ

What kind of hardware do I need?

CPU inference is currently broken for text generation, and enabled by default for text-to-speech (launch option). So you'll need a GPU with at least 8 GB of VRAM. If you run into video memory issues, you can lower max_history in ./generator/generator.py (maximum number of "words" that the AI can read before writing text).

How should I write things in a way that the AI understands?

You aren't in a dialog with an AI, you're just writing parts of a story, except there's autocompletion for the next ~60 words. Trying to talk to it will just throw it off. Write as if you were the narrator. Avoid typos.

The AI is repeating itself, help!

With this implementation, this shouldn't happen anymore. Still, here are a few tips:

  • You can switch to choice mode and hit < more > until the AI gives you something different.
  • You can also try go along with your story with a radical change in the action, ignoring the AI until it catches up with you.
  • You can /revert back to a point in the story before it started failing.
  • If all else fails, just start a new story.

To make this happen less often, try not to be redundant or use the same word twice. GPT's whole schtick is to complete sequences, so it tends to latch onto a pattern whenever it sees one.

Can I write in first person like in AIdungeon?

No, AIdungeon converts first person to second person before feeding your input to its model, which was trained for second person narration. Writing in first person on wrAIter will probably result in a first person response.

Does the AI learn from my inputs?

While the AI remembers the last thousand words of the story, it doesn't learn from it. Playing or saving a story won't affect the way it plays another.

Does the AI forget parts of the story?

Yes. Because the model can only take 1024 words in the input, the oldest events can be dropped to make the story fit. However, the context of the story (first paragraph) is never "forgotten".

Until you hit 1024 words, longer stories get progressively better results.

Can I fine-tune the AI on a corpus of my choice?

I didn't bother with fine-tuning GPT-NEO. The model is just too large to fit into my machine or any free cloud GPU. So you're on your own if you want to try.

wrAIter is a terrible name.

Yes it is. Still, with a French accent it's pronounced "writer".

Does this thing respect my privacy?

Yes, wrAIter only needs to connect to the internet to download the TTS model and to install python packages. It doesn't upload anything, and only saves stories on your hard drive if you explicitly ask it to. To play sound, the last played wave file is also stored on your machine.

I read an article about AIdungeon and profanity. Doesn't this have the same issues?

No. First, wrAIter doesn't adjust based on your or other players' inputs. The model runs on your machine, so tempering with it would only affect your own experience. Second, a censor is enabled by default, trashing and regenerating entire paragraphs if the model outputs a single banned word. It can be disabled in the launch options, giving you the freedom of choice.

Credits

About

AI writing assistant with a voiced narrator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.9%
  • Other 1.1%
0