Skip to content

Commit

Permalink
Fix gte-Qwen
Browse files Browse the repository at this point in the history
  • Loading branch information
Muennighoff authored Aug 1, 2024
1 parent ecf006e commit 0e66abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gritlm/gritlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(

if is_inference:
# Padding side right is necessary for `embed_instruction` to index correctly
self.tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, padding_side='right')
self.tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, padding_side='right', trust_remote_code=True)
if not(self.tokenizer.pad_token) and self.tokenizer.eos_token:
self.tokenizer.pad_token = self.tokenizer.eos_token
print('Set pad token to eos token: ' + self.tokenizer.pad_token)
Expand Down

0 comments on commit 0e66abc

Please sign in to comment.