Upload modeling.py
Browse files- modeling.py +1 -1
modeling.py
CHANGED
|
@@ -418,7 +418,7 @@ class MoEGPTForCausalLM(PreTrainedModel):
|
|
| 418 |
else idx[:, -self.config.sequence_length :]
|
| 419 |
)
|
| 420 |
# forward the model to get the logits for the index in the sequence
|
| 421 |
-
logits = self(idx_cond, date, get_logits=True)
|
| 422 |
# pluck the logits at the final step and scale by desired temperature
|
| 423 |
logits = logits[:, -1, :] / temperature
|
| 424 |
# optionally crop the logits to only the top k options
|
|
|
|
| 418 |
else idx[:, -self.config.sequence_length :]
|
| 419 |
)
|
| 420 |
# forward the model to get the logits for the index in the sequence
|
| 421 |
+
logits = self(idx_cond, date, get_logits=True).logits
|
| 422 |
# pluck the logits at the final step and scale by desired temperature
|
| 423 |
logits = logits[:, -1, :] / temperature
|
| 424 |
# optionally crop the logits to only the top k options
|