Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang committed Dec 26, 2024
1 parent beec29a commit 6cc0c99
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_align/test_template/test_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ def test_codegeex4():

def test_telechat():
pt_engine = PtEngine('TeleAI/TeleChat2-7B', torch_dtype=torch.float16)
messages = [{'role': 'user', 'content': '你是一个乐于助人的智能助手,请使用用户提问的语言进行有帮助的问答'}, {'role': 'user', 'content': '你好'}]
_infer_model(pt_engine, messages=messages)
messages = [{'role': 'system', 'content': '你是一个乐于助人的智能助手,请使用用户提问的语言进行有帮助的问答'}, {'role': 'user', 'content': '你好'}]
response = _infer_model(pt_engine, messages=messages)
pt_engine.default_template.template_backend = 'jinja'
_infer_model(pt_engine, messages=messages)
response2 = _infer_model(pt_engine, messages=messages)
assert response == response2


def test_glm_edge():
Expand Down

0 comments on commit 6cc0c99

Please sign in to comment.