File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4943,15 +4943,15 @@ def call_tokenizer_fn(self, value: str | List[str]):
4943
4943
if isinstance (value , str ):
4944
4944
out = self .tokenizer .encode (value , return_tensors = "pt" , ** kwargs )[0 ]
4945
4945
# TODO: incorporate attention mask
4946
- attention_mask = torch .ones_like (out , dtype = torch .bool )
4946
+ # attention_mask = torch.ones_like(out, dtype=torch.bool)
4947
4947
else :
4948
4948
kwargs ["padding" ] = (
4949
4949
self .padding if self .max_length is None else "max_length"
4950
4950
)
4951
4951
# kwargs["return_attention_mask"] = False
4952
4952
# kwargs["return_token_type_ids"] = False
4953
4953
out = self .tokenizer .batch_encode_plus (value , return_tensors = "pt" , ** kwargs )
4954
- attention_mask = out ["attention_mask" ]
4954
+ # attention_mask = out["attention_mask"]
4955
4955
out = out ["input_ids" ]
4956
4956
4957
4957
if device is not None and out .device != device :
You can’t perform that action at this time.
0 commit comments