Downloads · 30 days
13
17% of all-time downloads
ulmentflam/gpt2-774m-fineweb-mojo
gpt2-774m-fineweb-mojo is a text generation model from ulmentflam. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as odc-by.
A GPT-2 774M (36 layers, 20 heads, 1280 channels (d36)) language model trained from scratch — random initialisation, no GPT-2 warm-start — for one epoch of the FineWeb classic 10B-token sample, using llm.mojo, a Mojo/…
Downloads · 30 days
13
17% of all-time downloads
All-time downloads
78
Public
Parameters
774M
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin1.5 GB · 50%
From the Hugging Face model README
A GPT-2 774M (36 layers, 20 heads, 1280 channels (d36)) language model trained from scratch — random initialisation, no GPT-2 warm-start — for one epoch of the FineWeb classic 10B-token sample, using llm.mojo, a Mojo/MAX port of Andrej Karpathy's llm.c.
This is a training-run artifact and reproducibility reference, not a state-of-the-art model. At this scale and data budget GPT-2 produces locally-coherent but not highly capable text.
An earlier version of this repo held a checkpoint trained with a defect: a scratch-buffer overrun in the fused bias-gradient kernel meant several bias tensors received no gradient at any step. It was measurable directly from the published weights — GPT-2 initialises biases to exactly zero, so a bias still bit-exactly zero after 22,345 optimizer steps was never updated.
The kernel is fixed and this checkpoint is a complete re-run. The export now
refuses to publish any checkpoint whose matmul biases are all zero. Full
write-up:
docs/ai/dbias_scratch_overrun_silent_zero_bug.md.
The previous weights remain reachable in this repo's commit history.
| Final validation loss | 2.9859 |
| HellaSwag (acc_norm) | 3741/10042 = 37.25% (Wilson 95% CI [36.3%, 38.2%]) |
| Final train loss | 2.9619 |
| Throughput | ~133,296 tok/s (3441.1 ms/step, median over the last 500 steps) |
sample-10BT, GPT-2 BPE, one epoch = 22,345 stepsmodel.safetensors — GPT2LMHeadModel-compatible export, loadable with transformersmodel_22345.bin — the raw llm.mojo/llm.c-format checkpointinfer_gpt2.mojo loads any of a local .bin, a local .safetensors, or this
repo directly via --hf ulmentflam/gpt2-774m-fineweb-mojo.
git clone --recurse-submodules https://github.com/ulmentflam/llm.mojo.git
cd llm.mojo && make install-cuda
pixi run python data/fineweb.py -t classic -v 10B -m gpt-2
make build-bf16 WORLD_SIZE=7
See the launcher for this arm's exact flags.