# What is the correct prompt format for llama2?

**URL:** <https://discuss.huggingface.co/t/what-is-the-correct-prompt-format-for-llama2/70362>\
**Category:** Beginners\
**Created:** [January 24, 2024, 6:35am UTC](https://discuss.huggingface.co/t/what-is-the-correct-prompt-format-for-llama2/70362 "2024-01-24T06:35:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreyash2023](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@shreyash2023](https://discuss.huggingface.co/u/shreyash2023)\
**Post date:** [January 24, 2024, 6:35am UTC](https://discuss.huggingface.co/t/what-is-the-correct-prompt-format-for-llama2/70362/1 "2024-01-24T06:35:16Z")

</div>

I was fine-tuning my chatbot named llama2 and using a prompt format “~~[INST] {sys\_prompt} {prompt} [/INST] {response}~~”. However, after fine-tuning, it is giving the answer twice. I’m not sure if I’m going in the right direction or if there are still some missing parts. Can you assist me with this issue?"

---

<div class="post-metadata">

**Author:** ![AbishekSundar](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@AbishekSundar](https://discuss.huggingface.co/u/AbishekSundar)\
**Post date:** [January 24, 2024, 6:47am UTC](https://discuss.huggingface.co/t/what-is-the-correct-prompt-format-for-llama2/70362/2 "2024-01-24T06:47:01Z")

</div>

The following format can be used for fine tuning:

### Instruction:

{sample[“instruction”]}

### Input:

{sample[“input”]}

### Response:

{sample[“output”]}
