add option for instruct w sys prompts
Browse files
src/axolotl/prompt_strategies/alpaca_w_system.py
CHANGED
@@ -76,6 +76,19 @@ class SystemDataPrompter(AlpacaPrompter):
|
|
76 |
|
77 |
|
78 |
def load(tokenizer, cfg):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
return InstructionWSystemPromptTokenizingStrategy(
|
80 |
SystemDataPrompter(PromptStyle.CHAT.value),
|
81 |
tokenizer,
|
|
|
76 |
|
77 |
|
78 |
def load(tokenizer, cfg):
|
79 |
+
return load_chat(tokenizer, cfg)
|
80 |
+
|
81 |
+
|
82 |
+
def load_instruct(tokenizer, cfg):
|
83 |
+
return InstructionWSystemPromptTokenizingStrategy(
|
84 |
+
SystemDataPrompter(PromptStyle.INSTRUCT.value),
|
85 |
+
tokenizer,
|
86 |
+
cfg.train_on_inputs,
|
87 |
+
cfg.sequence_len,
|
88 |
+
)
|
89 |
+
|
90 |
+
|
91 |
+
def load_chat(tokenizer, cfg):
|
92 |
return InstructionWSystemPromptTokenizingStrategy(
|
93 |
SystemDataPrompter(PromptStyle.CHAT.value),
|
94 |
tokenizer,
|