Skip to content

Commit 7f5987d

Browse files
committed
Fix GPT2 test
1 parent 1867dfb commit 7f5987d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/models/gpt2/test_tokenization_gpt2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def test_special_tokens_mask_input_pairs_and_bos_token(self):
280280
@require_jinja
281281
def test_tokenization_for_chat(self):
282282
tokenizer = GPT2Tokenizer.from_pretrained(self.tmpdirname)
283+
tokenizer.chat_template = '{% for message in messages %}{{ message.content }}{{ eos_token }}{% endfor %}'
283284
test_chats = [
284285
[{"role": "system", "content": "You are a helpful chatbot."}, {"role": "user", "content": "Hello!"}],
285286
[

0 commit comments

Comments
 (0)