Views
No views yet
ckpt_0002000.pt … ckpt_0018000.pt: every 2000 optimizer stepsckpt_final.pt: step 19073 (10B tokens)N × 0.524B tokens.torch.save dict in this repo's custom Transformer format
(not a HuggingFace model):1import torch
2from gpt2_small import Transformer, TransformerConfig # from the code repo
3
4ckpt = torch.load("ckpt_final.pt", map_location="cpu", weights_only=False)
5cfg = TransformerConfig(**ckpt["config"])
6model = Transformer(cfg)
7model.load_state_dict(ckpt["model"])
8# ckpt also holds: "optimizer" (AdamW state), "step"transformers instead, load the converted
GPT2LMHeadModel from the model repo linked above.