float-trip commited on
Commit
029d4ac
1 Parent(s): 17d2822

Fix the prompt format.

Browse files

Two newlines after <</SYS>>: https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L45

No newlines added after that, but [INST] and [/INST] always have a space around them (except for the last [/INST]): https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L250

Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -68,7 +68,8 @@ pip3 install git+https://github.com/huggingface/transformers
68
  [INST] <<SYS>>
69
  You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.
70
  <</SYS>>
71
- {prompt}[/INST]
 
72
  ```
73
 
74
  To continue a conversation:
@@ -77,8 +78,8 @@ To continue a conversation:
77
  [INST] <<SYS>>
78
  You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.
79
  <</SYS>>
80
- {prompt}[/INST]{model_reply}
81
- [INST]{prompt}[/INST]
82
  ```
83
 
84
  ## Provided files
 
68
  [INST] <<SYS>>
69
  You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.
70
  <</SYS>>
71
+
72
+ {prompt} [/INST]
73
  ```
74
 
75
  To continue a conversation:
 
78
  [INST] <<SYS>>
79
  You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.
80
  <</SYS>>
81
+
82
+ {prompt} [/INST] {model_reply} [INST] {prompt} [/INST]
83
  ```
84
 
85
  ## Provided files