KALIA
A 58M-parameter language model trained from scratch on free Kaggle GPUs. The weights, training logs, and pre-registered experiments are public.
Python · PyTorch · Muon · tiktoken · Kaggle T4 x2 · HuggingFace Hub
Try it
- Generate text from the downloaded checkpoint:
python sample.py --ckpt <path-to-checkpoint> --prompt "Once upon a time"
Problem
Training a language model usually means renting GPUs or fine-tuning someone else's weights. I wanted an artifact where every weight, every byte of data, and every decision was mine, and a process that could be audited rather than taken on trust.
What I built
A decoder-only transformer with a resumable DDP trainer that survives Kaggle's 8.5-hour session caps by syncing checkpoints to the HuggingFace Hub, plus a licence-filtered tokenization pipeline, a micro-ablation harness, and an evaluation suite covering held-out loss, bits-per-byte, and zero-shot benchmarks.
Architecture
- CorpusLicence-filtered tokenization into memory-mapped shards.
- PretrainResumable DDP sessions with checkpoint sync and pre-registered stopping rules.
- EvaluateHeld-out loss, bits-per-byte, and zero-shot benchmarks on every candidate.
- ReleaseWeights and model card on HuggingFace; decisions and incidents in the repository.
Decisions
- Screen every recipe change at 30M parameters before spending full-run quota on it.
- Enforce promotion thresholds even against our own best result: Muon+ won 7 of 7 checkpoints and still did not ship at 0.015 nats below the bar.
Evidence
- Public release: weights, model card, 51 numbered decisions, 24 incidents, and hash-anchored pre-registrations.
- v0.2.0 reached 2.8248 held-out loss and 0.9244 bits-per-byte, 0.2285 nats better than v0.1.2 on the same rebuilt yardstick.
- A pre-registered architecture win inverted at two fresh seeds; the 58M seed spread is 0.2892 nats, and the negative result is published.
Limits
- A 58M storyteller, not an assistant: no instruction following, weak factual recall, and entity drift over long outputs.
- Training stopped at 73% of the cosine schedule when the weekly quota ran out; the plateau and the stop are documented rather than hidden.