Skip to content

Commit

Permalink
wip: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisborn committed Jan 25, 2025
1 parent 76461bb commit 5daeec9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/ntl/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,9 +1297,7 @@ def compute_loss(self, model, inputs, return_outputs=False):
labels = inputs["labels"]
else:
labels = None
print('Before IN', type(model))
outputs = model(**inputs)
print('Done with forward pass')
# Save past state if it exists
# TODO: this needs to be fixed and made cleaner later.
if self.args.past_index >= 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def forward(
output_hidden_states=output_hidden_states,
return_dict=return_dict,
)
print("TYPE outputs", type(outputs))

# If labels are provided, calculate and combine the NumberTokenLoss
if labels is not None and self.number_token_loss is not None:
Expand All @@ -70,6 +69,5 @@ def forward(
token_loss=outputs.loss,
loss=(outputs.loss + self.number_token_loss.weight * number_token_loss),
)
print("type", type(outputs), outputs.loss, outputs.number_loss)

return outputs

0 comments on commit 5daeec9

Please sign in to comment.