This is a GPT-2 model trained from scratch on [your dataset].
1import torch
2
3# Load checkpoint
4checkpoint = torch.load('model_hf_09000.pt') #current saved checkpoint, to be updated after fully training
5config = checkpoint['config']
6
7# Initialize model
8from your_model_file import GPT # Your GPT class
9model = GPT(config)
10model.load_state_dict(checkpoint['model'])
11model.eval()
12
13# Generate text
14# ... your generation code ...
Trained using custom GPT-2 implementation following Andrej Karpathy's approach.