Skip to content

Commit 6dcf174

Browse files
adumrewalpcuenca
andauthoredFeb 8, 2024
Update codellama.md. Sample code fix. (huggingface#1806)
* Update codellama.md Fix the sample code for on-going conversation with codellama instruct model. Line 260 should not have suffix append instruction instead it should be a simple value assignment. * Update codellama.md Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Pedro Cuenca <[email protected]>
1 parent 920ee88 commit 6dcf174

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎codellama.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ user_2 = "user_prompt_2"
256256
answer_2 = "answer_2"
257257
user_3 = "user_prompt_3"
258258

259-
prompt = f"<<SYS>>\\n{system}\\n<</SYS>>\\n\\n{user_1}"
260-
prompt += f"<s>[INST] {prompt.strip()} [/INST] {answer_1.strip()} </s>"
259+
prompt = f"<<SYS>>\n{system}\n<</SYS>>\n\n{user_1}"
260+
prompt = f"<s>[INST] {prompt.strip()} [/INST] {answer_1.strip()} </s>"
261261
prompt += f"<s>[INST] {user_2.strip()} [/INST] {answer_2.strip()} </s>"
262262
prompt += f"<s>[INST] {user_3.strip()} [/INST]"
263263

0 commit comments

Comments
 (0)
Please sign in to comment.