Skip to content
Jaivansh-777Public

About

A 62M-parameter language model built from scratch with a menacing AI-overlord personality. Runs in the browser.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

VEXOR

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.

What it is

  • ~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

Training plan

  1. Pretrain on ~2B tokens of FineWeb-Edu
  2. Persona fine-tune on VEXOR dialogues written with larger open-licensed teacher models
  3. Grade-and-fix loop: the model takes an exam, a teacher rewrites its wrong answers, it trains on the fixes, repeat
  4. Ship as a quantized ONNX model that runs in the browser

Status

  • 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)
  • Pretraining run
  • Persona fine-tune and evals
  • Browser demo

Quickstart

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              # pretrain

License

MIT

About

A 62M-parameter language model built from scratch with a menacing AI-overlord personality. Runs in the browser.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages