How can I load the model after pre-training? #55
Unanswered
MouadGhouti
asked this question in
Q&A
Replies: 1 comment
-
GPTConfig, GPT are defined in train_gpt2.py, I put them in a separate file gpt_class.pyimport torch device = "cpu" state_dict = torch.load('log/model_19072.pt') model.eval() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know this might seem a bit intuitive to some of you guys, but this is genuinely my first time to ever mess with LLMs. I'm currently training a model and I was wondering how can I use the model for inference after training? I have PyTorch checkpoint files, however I have no idea how can I load the model when it is done. Also, how can I upload the model to huggingface to make it available for other people?
Beta Was this translation helpful? Give feedback.
All reactions