Skip to content

Commit

Permalink
Merge pull request nomic-ai#58 from crclark/crclark/rem-dead-code
Browse files Browse the repository at this point in the history
Remove dead code
  • Loading branch information
zanussbaum authored Aug 1, 2024
2 parents 0c70843 + 0de25b7 commit 6067dbe
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/contrastors/trainers/text_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,6 @@ def _forward_step(self, model, batch, logit_scale, matryoshka_dims=None, matroys
attention_mask=batch["document_attention_mask"].to(model.device),
normalize=normalize,
)
if "negative_input_ids" in batch:
negative_outputs = model(
input_ids=batch["negative_input_ids"].to(model.device),
attention_mask=batch["negative_attention_mask"].to(model.device),
normalize=normalize,
)

queries = query_outputs["embedding"]
all_documents = gather_with_grad(document_outputs["embedding"])
Expand Down

0 comments on commit 6067dbe

Please sign in to comment.