Skip to content

Commit 4942e98

Browse files
committed
Fix Bloom test
1 parent 845b7ba commit 4942e98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/models/bloom/test_tokenization_bloom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_encodings_from_xnli_dataset(self):
135135
@require_jinja
136136
def test_tokenization_for_chat(self):
137137
tokenizer = self.get_rust_tokenizer()
138-
tokenizer.chat_template = "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}"
138+
tokenizer.chat_template = "{% for message in messages %}" "{{ message.content }}{{ eos_token }}" "{% endfor %}"
139139
test_chats = [
140140
[{"role": "system", "content": "You are a helpful chatbot."}, {"role": "user", "content": "Hello!"}],
141141
[

0 commit comments

Comments
 (0)