Repository navigation
Vrel 0.1.0
Download the trained model: vrel-0.1.0.zip below is Vrel 0.1 (13.9M parameters, 67 public-domain novels), 8-bit, ready to run. Unzip it into Lyss's models folder and type lyss. Also on Hugging Face.
First release.
- Vrel, a small transformer language model built from scratch: our own tokenizer, layers, attention, optimizer, training loop and sampler. No pretrained weights, no borrowed model code.
- Results on held-out text: validation loss 3.637 (perplexity 38.0), against 4.916 (136.5) for the bigram baseline and 9.080 (8,776) for random weights. 13.9M parameters, trained in 40 minutes on an RTX 4060 at 20,422 tokens/s. Only 0.3% of its 8-word phrases appear word for word in the training books.
python -m vrel preparedownloads and cleans 67 public-domain novels from Project Gutenberg, falling back to official Project Gutenberg mirrors when gutenberg.org is down, and resuming downloads that get cut off.python -m vrel tokenizertrains an 8,192-token byte-level BPE tokenizer and encodes the books.python -m vrel bigramscores a simple counting baseline for comparison.python -m vrel traintrains the model on your GPU (or CPU), with checkpoints and resume.python -m vrel generatewrites text from a prompt, streamed as it is produced.python -m vrel watchopens a live, beginner-friendly dashboard at http://127.0.0.1:8777: how Vrel learns in plain words, how unsure it is round by round, progress, and what it wrote at the start next to what it writes now.python -m vrel statsandpython -m vrel exportinspect a checkpoint and package it in a self-contained folder that other apps can load.