Downloads · 30 days
0
marmossburg/shakespeare
shakespeare is a machine learning model from marmossburg. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Transformer Language Model (Character-level GPT) A character-level Transformer language model built from scratch in PyTorch, based on Andrej Karpathy's "Let's Build GPT" tutorial. Trained on William Shakespeare's Cori…
Downloads · 30 days
0
Access
Public
Updated May 12, 2026
Repo size
36.7 MB
Likes
0
Public
Click a slice to open those files.
.pt36.7 MB · 100%
From the Hugging Face model README
Transformer Language Model (Character-level GPT) A character-level Transformer language model built from scratch in PyTorch, based on Andrej Karpathy's "Let's Build GPT" tutorial. Trained on William Shakespeare's Coriolanus. Model A causal (autoregressive) Transformer that predicts the next character given up to 256 previous characters. The model uses multi-head self-attention with causal masking, ReLU feed-forward networks, LayerNorm, and residual connections.
Trained on the full text of Coriolanus by William Shakespeare, preprocessed as a character-level sequence. The vocabulary consists of all unique characters present in the play. Usage import torch from torch.nn import functional as F
This model is shared for educational and research purposes.