Rename variable to use same convention
Browse files
src/axolotl/prompt_tokenizers.py
CHANGED
|
@@ -132,15 +132,15 @@ class CompletionPromptTokenizingStrategy(InstructionPromptTokenizingStrategy):
|
|
| 132 |
)
|
| 133 |
|
| 134 |
def tokenize_prompt(self, prompt):
|
| 135 |
-
|
| 136 |
-
full_prompt = self._build_full_prompt(
|
| 137 |
tokenized_full_prompt = self._tokenize(full_prompt)
|
| 138 |
|
| 139 |
return tokenized_full_prompt
|
| 140 |
|
| 141 |
-
def _build_full_prompt(self,
|
| 142 |
return self.prompter.build_prompt(
|
| 143 |
-
|
| 144 |
)
|
| 145 |
|
| 146 |
|
|
|
|
| 132 |
)
|
| 133 |
|
| 134 |
def tokenize_prompt(self, prompt):
|
| 135 |
+
instruction = self.parse_instruction_fields(prompt)
|
| 136 |
+
full_prompt = self._build_full_prompt(instruction)
|
| 137 |
tokenized_full_prompt = self._tokenize(full_prompt)
|
| 138 |
|
| 139 |
return tokenized_full_prompt
|
| 140 |
|
| 141 |
+
def _build_full_prompt(self, instruction):
|
| 142 |
return self.prompter.build_prompt(
|
| 143 |
+
instruction
|
| 144 |
)
|
| 145 |
|
| 146 |
|
src/axolotl/prompters.py
CHANGED
|
@@ -38,9 +38,9 @@ class JeopardyPrompter(AlpacaPrompter):
|
|
| 38 |
class CompletionPrompter(AlpacaPrompter):
|
| 39 |
def build_prompt(
|
| 40 |
self,
|
| 41 |
-
|
| 42 |
) -> str:
|
| 43 |
-
return
|
| 44 |
|
| 45 |
def get_response(self, output: str) -> str:
|
| 46 |
return output.strip()
|
|
|
|
| 38 |
class CompletionPrompter(AlpacaPrompter):
|
| 39 |
def build_prompt(
|
| 40 |
self,
|
| 41 |
+
instruction: str
|
| 42 |
) -> str:
|
| 43 |
+
return instruction
|
| 44 |
|
| 45 |
def get_response(self, output: str) -> str:
|
| 46 |
return output.strip()
|