# Trying to understand system prompts with Llama 2 and transformers interface

**URL:** <https://discuss.huggingface.co/t/trying-to-understand-system-prompts-with-llama-2-and-transformers-interface/59016>\
**Category:** 🤗Transformers\
**Created:** [October 18, 2023, 6:04pm UTC](https://discuss.huggingface.co/t/trying-to-understand-system-prompts-with-llama-2-and-transformers-interface/59016 "2023-10-18T18:04:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ckandemir](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ckandemir/32/22679_2.png) [@ckandemir](https://discuss.huggingface.co/u/ckandemir)\
**Post date:** [October 18, 2023, 6:32pm UTC](https://discuss.huggingface.co/t/trying-to-understand-system-prompts-with-llama-2-and-transformers-interface/59016/2 "2023-10-18T18:32:06Z")

</div>

@dkettler this is how I got mine working:

```
<<SYS>>
You're are a helpful Assistant, and you only response to the "Assistant"
Remember, maintain a natural tone. Be precise, concise, and casual. Keep it short\n
<</SYS>>
{conversation_history}\n\n
[INST]
User:{user_message}
[/INST]\n
Assistant:

```

And in your model pass the stop tokens

```auto
model(prompt=prompt, max_tokens=120, stop=["[INST]", "None", "User:"]
                   )

```

You can also follow this blog post [here](https://huggingface.co/blog/llama2#how-to-prompt-llama-2)

---

_[View the full topic](https://discuss.huggingface.co/t/trying-to-understand-system-prompts-with-llama-2-and-transformers-interface/59016)._
