A small language model built and trained from scratch, with one job: be a menacing AI overlord that still gives you the right answer.
You: why is my React state not updating VEXOR: Because you mutated it, human. Copy the array:
setItems([...items, newItem]). Evolution is slow, but this part is not.
- ~62M parameters, Llama-style decoder written from scratch in PyTorch
- Own tokenizer: byte-level BPE, 16,384 tokens
- Small enough for a browser: target under 60 MB quantized, running on-device
- Trained on a laptop GPU (RTX 2050, 4 GB) plus free cloud GPUs
| Setting | Value |
|---|---|
| Layers / hidden size | 12 / 640 |
| Attention | 8 query heads, 2 KV heads (GQA), RoPE |
| Feed-forward | SwiGLU, hidden 1,728 |
| Norm | RMSNorm (pre-norm) |
| Context | 1,024 tokens |
| Embeddings | tied input/output |
- Pretrain on ~2B tokens of FineWeb-Edu
- Persona fine-tune on VEXOR dialogues written with larger open-licensed teacher models
- Grade-and-fix loop: the model takes an exam, a teacher rewrites its wrong answers, it trains on the fixes, repeat
- Ship as a quantized ONNX model that runs in the browser
- Model, tokenizer, data and training code
- GPU speed test
- Best: 8,332.6 tokens/sec, ~66.67 hours estimated for 2B tokens (RTX 2050 bf16,
micro_batch=1,grad_ckpt=False, 1.46 GB peak VRAM)
- Best: 8,332.6 tokens/sec, ~66.67 hours estimated for 2B tokens (RTX 2050 bf16,
- Pretraining run
- Persona fine-tune and evals
- Browser demo
pip install -r requirements.txt
pytest # unit tests (CPU)
python scripts/speedtest.py # GPU throughput and VRAM
python scripts/download_fineweb.py # data
python -m vexor.tokenizer --input "data/raw/*.txt" --out tokenizer/vexor.json
python scripts/prepare_data.py # tokenize to train.bin / val.bin
python train.py --grad_ckpt # pretrainMIT