Skip to content

Commit

Permalink
optional
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Apr 19, 2024
1 parent b5f4098 commit 0879aaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litgpt/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@ def apply(self, prompt: str, **kwargs: str) -> str:

class Llama3(PromptStyle):
def apply(self, prompt: str, **kwargs: str) -> str:
# https://github.com/meta-llama/llama3/blob/359887376f0aaf30e433f23e25df858d8c2a9833/llama/tokenizer.py#L202-L229
return (
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n"
"You are a helpful assistant.<|eot_id|>\n"
"You are a helpful assistant.<|eot_id|>\n" # The system prompt is optional
"<|start_header_id|>user<|end_header_id|>\n\n"
f"{prompt}<|eot_id|>\n"
"<|start_header_id|>assistant<|end_header_id|>\n\n"
Expand Down

0 comments on commit 0879aaa

Please sign in to comment.