# graykode/gpt-2-Pytorch

Simple Text-Generator with OpenAI gpt-2 Pytorch Implementation

Repository: https://github.com/graykode/gpt-2-Pytorch
Canonical: https://ross.abutalabs.com/products/gpt-2-pytorch
Language: Python
License: MIT
License Family: permissive
Topics: gpt-2, pytorch, implementation, nlp, text-generator, story-telling, gpt2, natural-language-processing
Last push: 2019-07-08T15:24:35+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": 2753, "days_push": 2613, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1013, forks 230 (observed 2026-08-28T04:03:13.753777+00:00)

## What it is
A compact PyTorch reimplementation of OpenAI's GPT-2 for text generation, loading Hugging Face's converted pre-trained weights. It provides a simple script for generating text continuations from a prompt.

## Use cases
- generate text continuations from a prompt with GPT-2 in PyTorch
- study a minimal readable GPT-2 implementation
- run GPT-2 inference without TensorFlow
- experiment with transformer language models
- generate stories from seed text

## When to choose
- you want a small, readable GPT-2 codebase in PyTorch for learning or experimentation
- you need lightweight GPT-2 text generation without the original TensorFlow stack

## When to avoid
- you need modern LLMs, fine-tuning pipelines, or maintained tooling - use Hugging Face Transformers instead
- you need production-grade inference or recent model support

## Facets
- artifact type: library
- maturity: abandoned
- function: llm-inference, nlp, machine-learning
- domain: large-language-models, deep-learning
- platform: python, cross-platform
- tags: gpt-2, pytorch, text-generation, transformer, language-model, natural-language-processing

## Member repositories
- graykode/gpt-2-Pytorch (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:13.753777+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-30T07:11:39.629894+00:00, confidence not recorded.
  - readme: https://github.com/graykode/gpt-2-Pytorch (fetched 2026-08-28T04:03:13.753777+00:00, sha a5bb306de197)
- Data as of 2026-08-30T08:39:29.467469+00:00.
