moxzi
Docs / Tutorials

Tutorials

Longer projects built step by step: a GPT written from scratch as a Motoko actor, then trained on a GPU.

PageWhat it covers
Build a GPT in MotokoWrite microGPT, a complete GPT with its own autograd, as one Motoko actor, train it on 32,000 names and sample new ones.
Keep training through upgrades and crashesTrain microGPT in the background, change its code mid-training, kill the server, and end with the same model as an uninterrupted run.
Train a Shakespeare GPT on the GPUMove from scalars to tensors, train nanoGPT's character-level Shakespeare model from a Motoko actor on moxzid's tensor device, and generate text.
Serve and train with several actorsLet one actor write Shakespeare from another's weights while it trains, then train with four actors that average their weights.

If you only read one page, read Build a GPT in Motoko.