Views
No views yet
import torch
from slm.model import GPT
from slm.config import ModelConfig
cfg = ModelConfig()
model = GPT(cfg)
ckpt = torch.load("pretrain_final.pt", weights_only=False, map_location="cuda")
model.load_state_dict(ckpt["model"])
model.eval()