Skip to content

Commit

Permalink
fix starting token repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
gianlucamacri committed Nov 5, 2023
1 parent 2a33f37 commit 1807705
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def parse_config():
"### Instruction:\n{instruction}\n\n### Response:"
),
"prompt_no_input_llama2":(
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} [/INST]"
Expand Down
2 changes: 1 addition & 1 deletion inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"### Instruction:\n{instruction}\n\n### Response:"
),
"prompt_no_input_llama2": (
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} [/INST]"
Expand Down
4 changes: 2 additions & 2 deletions supervised-fine-tune-qlora.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def jload(f, mode="r"):
"### Instruction:\n{instruction}\n\n### Response:"
),
"prompt_no_input_llama2":(
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} [/INST]"
),
"prompt_input_llama2": (
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} \n{input} [/INST]"
Expand Down
4 changes: 2 additions & 2 deletions supervised-fine-tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ def jload(f, mode="r"):
"### Instruction:\n{instruction}\n\n### Response:"
),
"prompt_no_input_llama2":(
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} [/INST]"
),
"prompt_input_llama2": (
"<s>[INST] <<SYS>>\n"
"[INST] <<SYS>>\n"
"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.\n\n"
"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.\n"
"<</SYS>> \n\n {instruction} \n{input} [/INST]"
Expand Down

0 comments on commit 1807705

Please sign in to comment.