diff --git a/src/fabricator/prompts/base.py b/src/fabricator/prompts/base.py index 1f218e0..9179fc0 100644 --- a/src/fabricator/prompts/base.py +++ b/src/fabricator/prompts/base.py @@ -192,9 +192,9 @@ def get_prompt_text(self, labels: Union[str, List[str]] = None, examples: Option if examples: # due to small_model training fewshot_examples appear after some iterations if self.relevant_columns_for_fewshot_examples is None: - self.relevant_columns_for_fewshot_examples = examples.column_names + self.relevant_columns_for_fewshot_examples = ['text'] self.fewshot_prompt = self.inner_fewshot_example_separator.join( - [f"{var}: {{{var}}}" for var in self.relevant_columns_for_fewshot_examples] + [f"{{{var}}}" for var in self.relevant_columns_for_fewshot_examples] ) examples = self.filter_examples_by_columns(examples, self.relevant_columns_for_fewshot_examples) formatted_examples = [self.fewshot_prompt.format(**example) for example in examples] diff --git a/src/small_model_training/iterative_dataset_synthesis_movies.py b/src/small_model_training/iterative_dataset_synthesis_movies.py index c97a130..8563c29 100644 --- a/src/small_model_training/iterative_dataset_synthesis_movies.py +++ b/src/small_model_training/iterative_dataset_synthesis_movies.py @@ -5,13 +5,16 @@ label_options = ["positive", "negative"] prompt = BasePrompt( - task_description="Generate a {} movie review.", + task_description="You are writing a movie review. Write only one {} movie review similar to the following examples.", label_options=label_options, + target_formatting_template="", ) prompt_node = PromptNode( model_name_or_path="mistralai/Mistral-7B-Instruct-v0.1", - max_length=100, + max_length=500, + model_kwargs={"temperature": 0.9}, + ) generator = DatasetGenerator(prompt_node)