Skip to content

Commit

Permalink
templateミスってた
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Mar 28, 2024
1 parent c980304 commit d5cb6b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 179 deletions.
102 changes: 0 additions & 102 deletions src/dataset/prepare.py

This file was deleted.

10 changes: 5 additions & 5 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def simple_template_for_pretrain(input) -> str:
# inputから、2つ以上連続する改行を除去する
input = "\n".join([line for line in input.splitlines() if line.strip() != ""])
template = f"""\
{input}
{input}\
"""
# Remove any leading whitespace characters from each line in the template.
template = "\n".join([line.lstrip() for line in template.splitlines()])
Expand All @@ -50,7 +50,7 @@ def simple_template_for_train(input, output) -> str:
<|im_end|>
<|im_start|>assistant
{output}
<|im_end|>
<|im_end|>\
"""
# Remove any leading whitespace characters from each line in the template.
template = "\n".join([line.lstrip() for line in template.splitlines()])
Expand All @@ -65,7 +65,7 @@ def hint_template_for_train(hint, question, answer):
<|im_end|>
<|im_start|>assistant
{answer}
<|im_end|>
<|im_end|>\
"""
# Remove any leading whitespace characters from each line in the template.
template = "\n".join([line.lstrip() for line in template.splitlines()])
Expand All @@ -80,7 +80,7 @@ def context_template_for_train(context, question, answer):
<|im_end|>
<|im_start|>assistant
{answer}
<|im_end|>
<|im_end|>\
"""
# Remove any leading whitespace characters from each line in the template.
template = "\n".join([line.lstrip() for line in template.splitlines()])
Expand All @@ -98,7 +98,7 @@ def context_hint_template_for_train(hint, context, question, answer):
<|im_end|>
<|im_start|>assistant
{answer}
<|im_end|>
<|im_end|>\
"""
# Remove any leading whitespace characters from each line in the template.
template = "\n".join([line.lstrip() for line in template.splitlines()])
Expand Down
72 changes: 0 additions & 72 deletions src/train/tokenizer.py

This file was deleted.

0 comments on commit d5cb6b3

Please sign in to comment.