Skip to content

Commit

Permalink
style: ran linting
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Feb 17, 2024
1 parent 3b92090 commit f729288
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/seb/registered_models/e5_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ def preprocess(self, sentences: Sequence[str], instruction: str, encode_type: En
]
batch_dict = self.tokenizer.pad(batch_dict, padding=True, return_attention_mask=True, return_tensors="pt")



return batch_dict.to(self.model.device)

# but it does not work slightly better than this:
Expand Down Expand Up @@ -157,7 +155,6 @@ def encode(
else:
instruction = ""
for batch in tqdm(batched(sentences, batch_size)):

with torch.inference_mode():
batch_dict = self.preprocess(batch, instruction=instruction, encode_type=encode_type)
outputs = self.model(**batch_dict)
Expand Down

0 comments on commit f729288

Please sign in to comment.