Merge pull request #246 from OpenAccess-AI-Collective/sys-prompts-instruct

add option for instruct w sys prompts
This commit is contained in:
Wing Lian
2023-07-01 00:27:29 -04:00
committed by GitHub

View File

@@ -76,6 +76,19 @@ class SystemDataPrompter(AlpacaPrompter):
def load(tokenizer, cfg):
return load_chat(tokenizer, cfg)
def load_instruct(tokenizer, cfg):
return InstructionWSystemPromptTokenizingStrategy(
SystemDataPrompter(PromptStyle.INSTRUCT.value),
tokenizer,
cfg.train_on_inputs,
cfg.sequence_len,
)
def load_chat(tokenizer, cfg):
return InstructionWSystemPromptTokenizingStrategy(
SystemDataPrompter(PromptStyle.CHAT.value),
tokenizer,