)
def save_some_examples(self, result_dir):
- nb, nrow = 72, 4
+ nb, nrow = 128, 4
for t in self.all_tasks:
print(t.__name__)
prompts, answers = self.generate_prompts_and_answers_(nb, tasks=[t])
# exit(0)
# if True:
- nb, nrow = 72, 4
+ nb, nrow = 128, 4
# nb, nrow = 8, 2
# for t in grids.all_tasks:
# token_logprobas are NxMxT where M is the number of models
+# def compute_valid_quizzes_(token_logprobas):
+# warnings.warn("validation with uniform constraints", RuntimeWarning)
+# l = token_logprobas.min(dim=-1).values.sort(dim=-1).values
+# return (l[:, 0] < math.log(0.1)) & (l[:, 1] > math.log(0.5))
-
-def compute_valid_quizzes_(token_logprobas):
- warnings.warn("validation with uniform constraints", RuntimeWarning)
- l = token_logprobas.min(dim=-1).values.sort(dim=-1).values
- return (l[:, 0] < math.log(0.1)) & (l[:, 1] > math.log(0.5))
+# token_logprobas are NxMxT where M is the number of models
def compute_valid_quizzes(token_logprobas):