finds.dev← search

// the find

minimaxir/textgenrnn

★ 4,924 · Python · NOASSERTION · updated Jul 2022

Easily train your own text-generating neural network of any size and complexity on any text dataset with a few lines of code.

A Keras/TensorFlow wrapper for training character-level and word-level RNNs on arbitrary text datasets, with a pretrained Reddit-trained model you can fine-tune in a few lines. It was a solid democratization tool for text generation circa 2018-2020. The last commit was 2022 and it predates the transformer era entirely.

The attention + skip-connection architecture on top of char-rnn was genuinely thoughtful for its time — not just a naive LSTM stack. Transfer learning from the pretrained Reddit weights means you can get plausible output from small datasets quickly. The contextual label training mode is a nice touch: conditioning on metadata (subreddit, category) lets the recurrent layers learn decontextualized language, which measurably improves output quality. The included Jupyter notebooks cover a real range of use cases and the sample datasets make it easy to reproduce results without sourcing your own data.

It's dead. Last push 2022, and the approach — char-RNN with attention — was already obsolete when GPT-2 dropped in 2019. Anyone picking this up today is fighting TensorFlow version hell: it requires TF 2.1+ but the TF 2.x API surface has shifted enough that things will break. The model is small by necessity (fits pretrained weights in 2 MB), which caps what it can learn — the README even admits you have to cherry-pick from bulk generated output to get anything usable. There's no path forward: no transformer backbone, no HuggingFace compatibility, no tokenizer beyond the built-in 394-character vocab.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →