2
0
Sengxian 2 жил өмнө
parent
commit
8b3896dd56

+ 0 - 2
evaluation/tasks.py

@@ -187,8 +187,6 @@ class GenerationTask(BaseTask, ABC):
             raise ValueError(f"unknown strategy {self.config.sampling_strategy}")
 
     def predict_single_batch(self, batch) -> List[List[int]]:
-        # micro batch size = 1 for generation task,
-        # but we still need to return a list of predictions for consistency
         output = self.model.generate_text(batch, self.strategy, return_all_beams=False)
         return output
 

+ 0 - 1
tasks/lambada/task.py

@@ -45,7 +45,6 @@ class LAMBADA(GenerationTask):
         return self.tokenizer.tokenize(text.split(" ")[0])
 
     def predict_single_batch(self, batch):
-        # micro batch size = 1 here, but we still need to return a list of predictions for consistency
         outputs_batch: List[List[List[int]]] = self.model.generate_text(batch, self.strategy, return_all_beams=True)
         predictions = []
         for outputs in outputs_batch: