.pt PyTorch Model ->PreTrainedModel

Similar to (How can I share a pytorch saved model on huggingFace hub), I am attempting to convert/utilize a PyTorch model with the .pt extension with Huggingface.

I have been reading through the docs on the ‘PreTrainedModel’ class, but have Not found a one-for-one solution. The model is a GPT based on this repository (GitHub - karpathy/nanoGPT: The simplest, fastest repository for training/finetuning medium-sized GPTs.).

You can’t use model written in other libraries inside Transformers.

1 Like

Ah okay, thank you !