How can I input the sys message for the gemma instruct model?

#25
by Yingding - opened

I enter the prompt

<start_of_turn>user
You are a helpful, respectful and honest assistant.
Always answer as helpfully as possible using the context text provided.
Your answers should only answer the question once and not have any text after the answer is done.
Your answers should only be text and not include any HTML or other markup.

If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct.
If you don't know the answer to a question, please don't share false information. Just return "<end_of_turn>"


Q: Roger has 3 tennis balls. He buys 2 more cans of tennis balls. Each can has 4 tennis balls. How many tennis balls does he have now?
A: Roger started with 3 balls. 2 cans of 4 tennis balls each is 8 tennis balls. 3 + 8 = 11. The answer is 11.
Q: The cafeteria had 23 apples. If they used 20 to make lunch and bought 6 more, how many apples do they have?

<end_of_turn>

and got the following response back. Can I set the sys message for gemma instruct model at all?

 'Q: Roger has 3 tennis balls. He buys 2 more cans of tennis balls. Each can '
 'has 4 tennis balls. How many tennis balls does he have now?\n'
 'A: Roger started with 3 balls. 2 cans of 4 tennis balls each is 8 tennis '
 'balls. 3 + 8 = 11. The answer is 11.\n'
 'Q: The cafeteria had 23 apples. If they used 20 to make lunch and bought 6 '
 'more, how many apples do they have?\n'
 'A; They initially  had   \n'
 '\n'
 '**Answer:**\n'
 '\n'
 '\n'
 '## Q& A Explanation\n'
 '\n'
 '\n'
 '\n'
 '\n'
 '### **Question One**:\n'
 '\n'
 '\n'
 '\n'
 '- This question involves counting the number or objects (tennis ball) that '
 'are already present in possession by "Roger" which was three(<b><u>Starting '
Yingding changed discussion title from How can I input the sys message for the gemma instruct model. to How can I input the sys message for the gemma instruct model?
Google org

I don't think the model was trained with system prompt role 😉

This worked with some modifications to your prompt

<start_of_turn>user
You are a helpful, respectful, and honest assistant.
Always answer as helpfully as possible using the context text provided.
Your answers should only answer the question once and not have any text after the answer is done.
Your answers should only be text and not include any HTML or other markup.

If a question does not make sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. Just say I don't know

BEGIN EXAMPLE
Q: Roger has 3 tennis balls. He buys 2 more cans of tennis balls. Each can has 4 tennis balls. How many tennis balls does he have now?
A: Roger started with 3 balls. 2 cans of 4 tennis balls each is 8 tennis balls. 3 + 8 = 11. The answer is 11.
END EXAMPLE 

Your turn:
Q1: The cafeteria had 23 apples. If they used 20 apples to make lunch and bought 6 more, how many apples do they have?

Q2: What color is the sound of music?

<end_of_turn>
<start_of_turn>model

Model response

## Q1:

The cafeteria had 23 apples, used 20 apples for lunch, and bought 6 more apples. Therefore, there are 23 - 20 + 6 = 9 apples left.

## Q2:

The sound of music does not have a color associated with it.
Google org

That's correct -- the model wasn't trained with any system instructions.

To get the best performance, try using the right chat template, as @ahmedabobakr did, i.e. adding "\nmodel" part. Thanks @ahmedabobakr !

suryabhupa changed discussion status to closed

Sign up or log in to comment