Vrel: a mini language model built from scratch
2 min readupdated
Vrel is an ultracompact language model ranging from 14 to 28 million parameters, built entirely from scratch by the Crisp Tech team. It features its own custom tokenizer, layers, attention mechanism, optimizer, and training loop, trained from random weights on a single RTX 4060 GPU without external code borrowings. It cannot answer questions or handle dialogue, but is designed to demonstrate how language mechanics work and learn. The model is of interest to researchers and enthusiasts looking to explore the internal workings of generative systems through real code.
Key features
- Fully custom architecture built without third-party model code or pretrained weights.
- Compact size ranging from 14 to 28 million parameters, running even on entry-level hardware.
- Trained on the TinyStories dataset and classical literature from Project Gutenberg.
- High text generation speed of up to 148 tokens per second on an RTX 4060 for version 0.3.
What you can do
- Run and test the model locally using the Lyss terminal studio.
- Integrate the model into Python scripts to study the text generation process.
- Explore the architecture, weights, and code of specific versions (including 0.3.0 and 0.2.0) for educational purposes.
Example
Text generation example using Vrel version 0.3 (seed 3): "The dog found a box in the park. He wanted to see what was inside. He barked and ran around the box, trying to open it."
Read more
DetailsVersion 0.3.0: 14.0M parameters, validation loss 1.303, perplexity 3.7.
Version 0.2.0: 27.8M parameters, validation loss 1.278, perplexity 3.6.
Requirements: RTX 4060 GPU or 4 CPU threads, Python, and PyTorch support.
License: MIT for code and weights, TinyStories data under the CDLA-Sharing-1.0 license.










Comments