Update test_template.py

Former-commit-id: 33420bab81cfc7db1dfd3cd4200b8681bf7de9e6
This commit is contained in:
hoshi-hiyouga 2024-07-15 22:55:05 +08:00 committed by GitHub
parent f67ddc05d6
commit c0493daa60

View File

@ -122,7 +122,7 @@ def test_jinja_template(use_fast: bool):
assert tokenizer.apply_chat_template(MESSAGES) == ref_tokenizer.apply_chat_template(MESSAGES)
@pytest.mark.skipif(IN_GITHUB_ACTIONS or HF_TOKEN is None, reason="Gated model.")
@pytest.mark.skipif(HF_TOKEN is None, reason="Gated model.")
def test_gemma_template():
prompt_str = (
"<bos><start_of_turn>user\nHow are you<end_of_turn>\n"
@ -134,7 +134,7 @@ def test_gemma_template():
_check_template("google/gemma-2-9b-it", "gemma", prompt_str, answer_str, extra_str="<end_of_turn>\n")
@pytest.mark.skipif(IN_GITHUB_ACTIONS or HF_TOKEN is None, reason="Gated model.")
@pytest.mark.skipif(HF_TOKEN is None, reason="Gated model.")
def test_llama3_template():
prompt_str = (
"<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\nHow are you<|eot_id|>"