Views
No views yet
| Parameter | Value |
|---|---|
| Parameters | ~4.9M |
| Vocab Size | 72 (character-level) |
| Embedding Dim | 256 |
| Layers | 6 |
| Attention Heads | 8 |
| Context Length | 128 |
| Training Steps | 3,000 |
| Final Val Loss | 0.9235 |
1import torch
2from train_torch import MiniGPT
3
4# Load model
5model = MiniGPT(vocab_size=72, n_embd=256, n_head=8, n_layer=6, block_size=128, dropout=0.1)
6model.load_state_dict(torch.load("model.safetensors"))
7model.eval()
8
9# Generate
10context = torch.zeros((1, 1), dtype=torch.long)
11output = model.generate(context, max_new_tokens=200, temperature=0.7)He saw a bike with a big box. He was a girl named Sue. Sue liked to give it very happy. One day, she got to the little boy named Tim. Tim was very happy. He wind the best friends was friends. The tree...