If you wish to use
AutoModel, you will have to register your classesHow to convert a PyTorch nn.Module into a HuggingFace PreTrainedModel object?
Given a simple neural net in Pytorch like:
import torch.nn as nn
net = nn.Sequential(
nn.Linear(3, 4),
nn.Sigmoid(),
nn.Linear(4, 1),
nn.Sigmoid()
).to(device)
How d...
https://stackoverflow.com/questions/73948214/how-to-convert-a-pytorch-nn-module-into-a-huggingface-pretrainedmodel-object

Seonglae Cho