CoolFace
Apppublic

Mayura01/T-CLM2

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
loadmodel.py9 linesDownload Raw Back to root
1import torch2 3def load_model(config, device, model):4    model = model.to(device)5    model_file_path = "model.pt"6    state = torch.load(str(model_file_path), map_location=device, weights_only=True)7    model.load_state_dict(state['model_state_dict'])8 9    return model