Skip to content

Commit

Permalink
Add a space in the Llama 2 prompt to match the reference implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumekln committed Sep 14, 2023
1 parent f9f584b commit e2b0133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/llama2/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def build_prompt(sp, dialog):
[
["<s>"]
+ sp.encode_as_pieces(
f"{B_INST} {(prompt['content']).strip()} {E_INST} {(answer['content']).strip()}"
f"{B_INST} {(prompt['content']).strip()} {E_INST} {(answer['content']).strip()} "
)
+ ["</s>"]
for prompt, answer in zip(
Expand Down

0 comments on commit e2b0133

Please sign in to comment.