can you show the whole code to using?

#9
by AngoHF - opened

there is the code you show in model card ,but it is part, i do not use any GUI tools but code ,but i can not write then by my self.
so would you plz show the whole code ?

messages = [
{"role": "system", "content": "You are Hermes 2."},
{"role": "user", "content": "Hello, who are you?"}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)

there is the code you show in model card ,but it is part, i do not use any GUI tools but code ,but i can not write then by my self.
so would you plz show the whole code ?

messages = [
{"role": "system", "content": "You are Hermes 2."},
{"role": "user", "content": "Hello, who are you?"}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)

The prompt should look like:

<|im_start|>system
sytem prompt<|im_end|>
<|im_start|>user
Hello!<|im_end|>
<|im_start|>assistant

Sign up or log in to comment