add prepare_inputs_for_generation
Browse files- modeling.py +5 -0
modeling.py
CHANGED
@@ -11,3 +11,8 @@ class NewModelForCausalLM(BertModel):
|
|
11 |
def __init__(self, config):
|
12 |
super().__init__(config)
|
13 |
self.last_layer = torch.nn.Linear(config.hidden_size, config.new_hidden_size)
|
|
|
|
|
|
|
|
|
|
|
|
11 |
def __init__(self, config):
|
12 |
super().__init__(config)
|
13 |
self.last_layer = torch.nn.Linear(config.hidden_size, config.new_hidden_size)
|
14 |
+
|
15 |
+
# prior to v4.45, overwriting `prepare_inputs_for_generation` was a hard requirement for a model to be
|
16 |
+
# `generate`-compatible
|
17 |
+
def prepare_inputs_for_generation(self):
|
18 |
+
pass
|