Crystalcareai
commited on
Update modeling_quiet.py
Browse files- modeling_quiet.py +7 -1
modeling_quiet.py
CHANGED
@@ -1233,7 +1233,6 @@ class QuietForCausalLM(QuietPreTrainedModel):
|
|
1233 |
self.loss_mean = loss_mean
|
1234 |
self.all_rewards = []
|
1235 |
self.all_unreduced_losses = []
|
1236 |
-
self.kill_after = 100
|
1237 |
|
1238 |
self.start_embedding = nn.Parameter(torch.zeros(2, self.model.config.hidden_size))
|
1239 |
self.end_embedding = nn.Parameter(torch.zeros(2, self.model.config.hidden_size))
|
@@ -1455,6 +1454,13 @@ class QuietForCausalLM(QuietPreTrainedModel):
|
|
1455 |
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
1456 |
"Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
|
1457 |
```"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1458 |
|
1459 |
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
1460 |
output_hidden_states = (
|
|
|
1233 |
self.loss_mean = loss_mean
|
1234 |
self.all_rewards = []
|
1235 |
self.all_unreduced_losses = []
|
|
|
1236 |
|
1237 |
self.start_embedding = nn.Parameter(torch.zeros(2, self.model.config.hidden_size))
|
1238 |
self.end_embedding = nn.Parameter(torch.zeros(2, self.model.config.hidden_size))
|
|
|
1454 |
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
1455 |
"Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
|
1456 |
```"""
|
1457 |
+
log_dict = self.log_dict if self.training else self.eval_log_dict
|
1458 |
+
|
1459 |
+
if not self.training:
|
1460 |
+
n_ahead_talk_to_restore = self.n_ahead_talk
|
1461 |
+
n_passes_to_restore = self.n_passes
|
1462 |
+
self.n_ahead_talk = 1
|
1463 |
+
self.n_passes = 1
|
1464 |
|
1465 |
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
1466 |
output_hidden_states = (
|