# karpathy/char-rnn

Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch

Repository: https://github.com/karpathy/char-rnn
Canonical: https://ross.abutalabs.com/products/char-rnn
Language: Lua
License Family: other
Last push: 2023-10-24T17:15:27+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4122, "days_push": 1044, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12095, forks 2630 (observed 2026-08-28T04:10:51.748357+00:00)

## What it is
char-rnn is a Torch/Lua implementation of multi-layer recurrent neural networks (RNN, LSTM, GRU) for character-level language modeling. It trains on a plain text file to predict the next character and can then sample new text character by character.

## Use cases
- train a character-level language model on a text corpus
- generate text in the style of a training file
- learn how LSTMs and GRUs are implemented
- experiment with recurrent neural networks on GPU
- reproduce the 'unreasonable effectiveness of RNNs' blog post results

## When to choose
- you want the classic reference implementation of char-level RNNs for study or teaching
- you need a simple, well-known baseline for text generation experiments
- you are working in Torch/Lua with CUDA or OpenCL GPUs

## When to avoid
- you need a maintained or production-ready framework - the repo points to torch-rnn as the preferred successor
- you work in Python with PyTorch/TensorFlow rather than Torch/Lua
- you need modern architectures like transformers or subword tokenization

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, llm-training
- domain: deep-learning, machine-learning
- platform: lua
- tags: char-rnn, lstm, gru, torch, language-modeling, text-generation, natural-language-processing, linux, macos, gpu

## Member repositories
- karpathy/char-rnn (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:51.748357+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-29T17:14:56.330716+00:00, confidence not recorded.
  - readme: https://github.com/karpathy/char-rnn (fetched 2026-08-28T04:10:51.748357+00:00, sha 171251c93ce5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
