# minimaxir/textgenrnn

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

Repository: https://github.com/minimaxir/textgenrnn
Canonical: https://ross.abutalabs.com/products/textgenrnn
Language: Python
License: NOASSERTION
License Family: other
Topics: keras, deep-learning, text-generation, tensorflow, python
Last push: 2022-07-17T19:07:49+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3314, "days_push": 1508, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4922, forks 731 (observed 2026-08-28T04:09:02.471219+00:00)

## What it is
A Python 3 library built on Keras/TensorFlow for easily training char-rnn style neural networks that generate text from any dataset in a few lines of code. It supports character- and word-level generation, attention weighting, bidirectional RNNs, and pretrained models.

## Use cases
- generate text in the style of a corpus
- train a char-rnn on a text file
- create a fake Hacker News headline generator
- train a small text-generating neural network with a few lines of code
- generate tweets or titles from a dataset
- experiment with RNN text generation in a Colab notebook

## When to choose
- you want quick, low-effort text generation from a custom dataset
- you need a small (~2MB) model that trains fast and runs on CPU
- you want character- or word-level generation with minimal code
- you are prototyping or teaching RNN text generation

## When to avoid
- you need modern transformer-based language models
- you need production-grade, actively maintained NLP tooling
- you need fine control over model architecture beyond RNN options
- you require long-term support, as the project is largely in maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, nlp
- domain: deep-learning, machine-learning
- platform: python, cross-platform
- tags: text-generation, char-rnn, keras, tensorflow, rnn, language-model, natural-language-processing, gpu

## Member repositories
- minimaxir/textgenrnn (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:02.471219+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:01.625951+00:00, confidence not recorded.
  - readme: https://github.com/minimaxir/textgenrnn (fetched 2026-08-28T04:09:02.471219+00:00, sha d8f74cf8c4cc)
  - registry_pypi: https://pypi.org/pypi/textgenrnn/json (fetched 2026-08-29T08:59:50.499962+00:00, sha f9ebb578b98e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
