Skip to content

Commit

Permalink
rm max_length para when using tokenizer.pad
Browse files Browse the repository at this point in the history
- avoid warning information
  • Loading branch information
hanhainebula committed Nov 22, 2024
1 parent 05cb564 commit 5702c80
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion FlagEmbedding/inference/reranker/decoder_only/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def __call__(self, data):
return self.tokenizer.pad(
data,
padding=True,
max_length=self.max_len,
pad_to_multiple_of=8,
return_tensors='pt',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def __call__(self, data):
collected = self.tokenizer.pad(
features,
padding=True,
max_length=self.max_len,
pad_to_multiple_of=8,
return_tensors='pt',
)
Expand Down
1 change: 0 additions & 1 deletion FlagEmbedding/inference/reranker/encoder_only/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ def compute_score_single_gpu(
inputs = self.tokenizer.pad(
sentences_batch,
padding=True,
max_length=max_length,
return_tensors='pt',
**kwargs
).to(device)
Expand Down

0 comments on commit 5702c80

Please sign in to comment.