Skip to content

Commit

Permalink
[fix] Add tokenizer.pad_token for CLM
Browse files Browse the repository at this point in the history
  • Loading branch information
tamohannes committed Aug 19, 2024
1 parent b89a815 commit a1e3b1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion urartu/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.26
2.0.27
1 change: 1 addition & 0 deletions urartu/models/model_causal_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def model(self) -> AutoModelForCausalLM:
def tokenizer(self):
if self._tokenizer is None:
self._tokenizer = AutoTokenizer.from_pretrained(self.cfg.name)
self._tokenizer.pad_token = self._tokenizer.eos_token
return self._tokenizer

def generate(self, prompt: str, generate_cfg=None):
Expand Down

0 comments on commit a1e3b1e

Please sign in to comment.