git404hub

what is char-rnn fr?

karpathy/char-rnn — explained in plain English

Analysis updated 2026-06-24 · repo last pushed 2023-10-24

12,065LuaAudience · researcherComplexity · 3/5DormantSetup · hard

tl;dr

char-rnn trains a character-level neural network on any text file, feed it Shakespeare and it writes new Shakespeare-like text, feed it code and it generates code-like output, character by character.

vibe map

mindmap
  root((char-rnn))
    What it does
      Character-level RNN
      Text style learning
      New text generation
    Model Variants
      LSTM
      GRU
    Use Cases
      Creative writing
      Code generation
      Style mimicry
    Tech
      Lua Torch
      GPU training

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Train a model on a corpus of Shakespeare plays and generate entirely new dialogue that mimics the original style.

VIBE 2

Prototype a character-level text generation model on your own dataset to understand how RNNs learn sequential patterns.

VIBE 3

Generate plausible-looking code snippets by training on a folder of source files from any programming language.

what's the stack?

LuaTorch

how it stacks up fr

karpathy/char-rnnxmake-io/xmakejunyanz/cyclegan
Stars12,06511,97412,852
LanguageLuaLuaLua
Last pushed2023-10-24
MaintenanceDormant
Setup difficultyhardeasyhard
Complexity3/53/54/5
Audienceresearcherdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · hard time til it works · 1day+

Requires the Torch ML framework with Lua, GPU training needs CUDA. The project is older and environment setup can be non-trivial on modern systems.

No license information is provided in the explanation.

prompts (copy fr)

prompt 1
I want to use char-rnn to generate new blog posts in my writing style. Walk me through preparing my text file, choosing training hyperparameters, and sampling from the finished model.
prompt 2
Help me train char-rnn on a collection of Python source files to generate Python-like code, what model size should I use and how long should I train for a 1MB dataset?
prompt 3
Explain the difference between the LSTM and GRU options in char-rnn and which one works better for longer-range stylistic patterns.
prompt 4
My char-rnn training loss is not decreasing after 10 000 iterations. What hyperparameters should I adjust and how do I tell if the model is overfitting?

Frequently asked questions

what is char-rnn fr?

char-rnn trains a character-level neural network on any text file, feed it Shakespeare and it writes new Shakespeare-like text, feed it code and it generates code-like output, character by character.

What language is char-rnn written in?

Mainly Lua. The stack also includes Lua, Torch.

Is char-rnn actively maintained?

Dormant — no commits in 2+ years (last push 2023-10-24).

What license does char-rnn use?

No license information is provided in the explanation.

How hard is char-rnn to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is char-rnn for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.