Custom GPT (nanoGPT-style) trained on uint16 token bins.
1import torch, json
2from my_training_script import GPT, GPTConfig # your script path
3
4cfg = GPTConfig(
5 block_size=512,
6 vocab_size=50304,
7 n_layer=12,
8 n_head=32,
9 n_embed=768,
10 dropout=0.2,
11)
12
13model = GPT(cfg)
14# If you uploaded safetensors:
15# from safetensors.torch import load_file
16# sd = load_file("model.safetensors")
17# If you uploaded PyTorch bin:
18# sd = torch.load("pytorch_model.bin", map_location="cpu")
19# model.load_state_dict(sd, strict=True)
20model.eval()