Crystalcareai
commited on
Update modeling_quiet.py
Browse files- modeling_quiet.py +1 -1
modeling_quiet.py
CHANGED
@@ -1126,7 +1126,7 @@ class QuietForCausalLM(QuietPreTrainedModel, GenerationMixin):
|
|
1126 |
|
1127 |
return generated_text
|
1128 |
|
1129 |
-
|
1130 |
def generate(self, input_ids: torch.LongTensor = torch.LongTensor(), attention_mask: Optional[torch.Tensor] = None, max_new_tokens: Optional[int] = None, temperature: float = 1.1, **kwargs):
|
1131 |
return self.generate_with_callback(input_ids, attention_mask, max_new_tokens, temperature, callback=None, **kwargs)
|
1132 |
|
|
|
1126 |
|
1127 |
return generated_text
|
1128 |
|
1129 |
+
@torch.no_grad()
|
1130 |
def generate(self, input_ids: torch.LongTensor = torch.LongTensor(), attention_mask: Optional[torch.Tensor] = None, max_new_tokens: Optional[int] = None, temperature: float = 1.1, **kwargs):
|
1131 |
return self.generate_with_callback(input_ids, attention_mask, max_new_tokens, temperature, callback=None, **kwargs)
|
1132 |
|