Rocketknight1 HF staff commited on
Commit
0b35b1b
1 Parent(s): 2571544

Update modeling_fake_custom.py

Browse files
Files changed (1) hide show
  1. modeling_fake_custom.py +8 -4
modeling_fake_custom.py CHANGED
@@ -1,9 +1,13 @@
1
- from transformers import GPT2Model, GPT2LMHeadModel
2
  from .configuration_fake_custom import FakeCustomConfig
3
 
4
- class FakeCustomModel(GPT2Model):
5
  config_class = FakeCustomConfig
6
 
7
 
8
- class FakeCustomModelForCausalLM(GPT2LMHeadModel):
9
- config_class = FakeCustomConfig
 
 
 
 
 
1
+ from transformers import PretrainedModel
2
  from .configuration_fake_custom import FakeCustomConfig
3
 
4
+ class FakeCustomPreTrainedModel(PreTrainedModel):
5
  config_class = FakeCustomConfig
6
 
7
 
8
+ class FakeCustomModel(FakeCustomPreTrainedModel):
9
+ _auto_class = "AutoModel"
10
+
11
+
12
+ class FakeCustomForCausalLM(FakeCustomPreTrainedModel):
13
+ _auto_class = "AutoModelForCausalLM"