from transformers import GPT2Model, GPT2LMHeadModel class FakeCustomModel(GPT2Model): pass class FakeCustomModelForCausalLM(GPT2LMHeadModel): pass