Supernova-tinyArc
A compact 9.5M-parameter language model built from scratch
2 min readupdated
An autoregressive language model from Supernova AI and Software Foundations, built and trained from scratch to generate short stories in English. It is based on a LLaMA-style decoder-only Transformer architecture with a custom PyTorch implementation and its own ByteLevel BPE tokenizer. Unlike large general-purpose models, this is an experimental base model with only 9.5 million parameters that has not undergone instruction-tuning. It is suitable for studying transformer internals, experimenting with small models, and conducting research tasks.
Key features
- LLaMA-style architecture: 6 layers, 8 attention heads, RoPE positional encoding (a method for handling word order), RMSNorm normalization, and SwiGLU activation.
- Custom ByteLevel BPE tokenizer with a 16,000-token vocabulary and a 512-token context window.
- Trained from scratch on the synthetic TinyStories short story dataset (approximately 463.1 million tokens).
- The repository includes full training checkpoints (
best.ptandlatest.pt), containing both model weights and training state.
What you can do
- Generate continuations for short English stories given an initial prompt.
- Use the code and model architecture as a visual learning aid for understanding decoder-only transformers in PyTorch.
- Conduct custom fine-tuning experiments (for example, to build an instruction-tuned version) or test sampling algorithms on modest hardware.
Example
python src/generate.py \
--prompt "Once upon a time, a young inventor discovered" \
--max-new-tokens 150 \
--temperature 0.8 \
--top-k 50 \
--top-p 0.9Read more
DetailsMetrics: final validation loss was 1.6054, and validation perplexity was around 4.98.
Training: 15,000 optimizer steps in ~69 minutes on a single NVIDIA Tesla T4 GPU.
Hardware: the generation script automatically uses CUDA if available or runs on a CPU (Python 3.10+ required).
Limitations: the model is not designed for factual Q&A, reasoning, math, or coding, and may lose the narrative thread.










Comments