HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
minimaxir
textgenrnn
Python2017–2021
minimaxir / textgenrnn

textgenrnn

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

5Distinct people
15Mentions
0Explicit recommenders
4.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2017-08-07 14:28:15 UTC to 2021-03-01 00:51:35 UTC.

02462017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 3 submissions, 2 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 6 mentions; 3 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC532
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC633
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

15 sources
This is basically a mechanism that would allow for a honeytrap on steroids. https://blog.finjan.com/honeytokens-used-to-track-cybercrimi... > that would require keeping track of bogus submissions You don't have to keep track of the submissions because you can generate them with a reversible algorithm. Basically use a word list method https://github.com/bitcoin/bips/blob/master/bip-0039.mediawi... but have the list be entirely people's names (or generated from a corpus of known accounts and something like https://github.com/minimaxir/textgenrnn to make them harder to spot) > generating new data for each company where you create an account. yes https://arxiv.org/abs/2006.15794 Basically treating the data from various email honeypots as a "Numbers station" but instead of using it to prime encryption keys, you use it as a form of steganograp
Read the rest
hy. To do this entirely anonymously, the next step would be to publish on a public blockchain or anonymous service so that the owner's device (that generated the emails originally) can uploaded a signed statement that proves they were the phone pwned and who the offending app was. A similar idea seems baked into a couple of crypto initiatives https://coincentral.com/sentinel-protocol/ but fundamentally we're talking about an anonymous reputation system modeled after how swarms operate to gossip risk. It would be necessarily stochastic in nature because you'd be depending on the 3rd parties to send emails a bit at a time, but if you get a deluge of phones all reporting the same app, you can assume fairly confidently that app has been compromised. Punishment (Brand reputation, sanctions by app store) for being compromised would encourage better security. This could (and would need to be) operated at the hardware level and orchestrated by the OS, and OS provider. This is the kind of thing apple and google could do as part of their privacy initiatives around "differential privacy" https://venturebeat.com/2019/12/21/ai-has-a-privacy-problem-... What, you think that deep learning chip on your phone is there to make cute avatars?
In Fake_contacts: Android app to create fake phone contacts, to do data-poisoning
Per the embedded video (also used on the official site), they used textgenrnn (https://github.com/minimaxir/textgenrnn) to train the text-generating AI, which I made. Although I really wish they said that explicitly: not as a means of attribution, but to make the text generation more accessible/transparent which is why I made textgenrnn in the first place. GPT-2 would likely have much more interesting results on such longer input text. If anyone from AKQA reads this, I'm open to help setting that up.
In Speedgate: World’s First Sport Generated by AI
I made textgenrnn (https://github.com/minimaxir/textgenrnn) as a higher-level approach to creating char-rnns, solving some issues such as the cold start problem (textgenrnn doesn't need a seed) and incorporating a few newer discoveries since 2015 such as Attention and CuDNN speedups. There are other strategies for working with text to solve generic classification problems (e.g. BERT), but for text generation, LSTMs still can't be beat even though it still has issues with longer-term dependencies.
In The Unreasonable Effectiveness of Recurrent Neural Networks (2015)
As someone who has spent a lot of time working with text-generating neural networks (https://github.com/minimaxir/textgenrnn), I have a few quick comments. 1) The input dataset from Memegenerator is a bit weird. More importantly, it does not distinctly identify top and bottom texts (some have a capital letter to signifify the start of the bottom text, which isn't always true). A good technique when encoding text for these types of things is to use a control token (e.g. a newline) to indicate these types of behaviors. (the conclusion notes this problem: "One example would be to train on a dataset that includes the break point in the text between upper and lower for the image. These were chosen manually here and are important for the humor impact of the meme.") 2) The use of GLoVe embeddings don't make as much sense here, even as a base. Ge
Read the rest
nerally the embeddings work best on text which follows real-world word usage, which memes do not follow. (in this case, it's better to let the network train the embeddings from scratch) 3) A 512-cell LSTM might be too big for a word-level model of that size; since the text follows rules, a 256-cell Bidirectional might work better.
In Dank Learning: Generating Memes Using Deep Neural Networks
Two of my projects, textgenrnn (https://github.com/minimaxir/textgenrnn) and reactionrnn (https://github.com/minimaxir/reactionrnn) are among the pretrained models. While this is allowed by the MIT License (and there is sufficient attribution to the source repos), it might be helpful to more explicitly state that the curated models are forks/modifications. These models also have a dependency on the source packages, which I can't promise that it won't have breaking changes if I do decide to update the package. I do like the new accompanying examples for those projects, and it's good to see the projects actually being used! :)
In Show HN: Curated, Pre-trained ML Models for Transfer Learning
It should be noted that per the included Jupyter Notebook, the resulting network took 24 hours to train, and the resulting network (of a 3-layer 512 cell LSTM) would be hundreds of MB. (too much to share on GitHub anyways). The approach in the repo also uses a word-based approach instead of a character-based approach. Although a word-approach avoids typoes/nonsense, it makes prediction much more difficult since the selection space is harder. (from notebook, error is high as well). There are lots of trade offs in this field. Training these networks is not for the faint of heart and one of the reasons I developed a tool to train text generators using a pretrained RNN (https://github.com/minimaxir/textgenrnn) on a much more simple network architecture that trains quickly, although it probably would not hit the depth of all of Game of Thrones
Read the rest
.
In Show HN: RNN that generates Game of Thrones text
As someone who's cited by the OP and coincidentally released a tool today that easily trains a LSTM on any dataset demoed with Hacker News data (https://github.com/minimaxir/textgenrnn), I have a couple comments: 1) My Get All Hacker News Submissions script is somewhat obsolete since all HN data is now on BigQuery (will add a note to the README today) 2) There is a massive, massive selection bias in terms of the quality of the selected generated texts. If you look at the sample output (https://github.com/danhon/deep-hackernews/blob/master/sample...), there is a large disparity in quality between the chosen submissions for the blog post and a typical generated submission. (this is expected, although the need for human curation damages the "Turing test" suggestions proposed by other commenters) Compare with the sample output at similar temp
Read the rest
erature from my 128-cell LSTM network (https://github.com/minimaxir/textgenrnn/blob/master/outputs/...), which is several orders smaller (OP uses a 512-cell network), and many magnitudes lower amount of training data. (I am curious how long OP spent training the network.)
In LSTM trained on HN

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.