MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / construct_requests

Method construct_requests

test/general/lm_eval/tasks/superglue.py:255–262  ·  view source on GitHub ↗
(self, doc, ctx)

Source from the content-addressed store, hash-verified

253 return f"{answer}\nIs the answer correct? {label_str}"
254
255 def construct_requests(self, doc, ctx):
256 true_choice = self.format_answer(answer=doc["answer"], label=True)
257 false_choice = self.format_answer(answer=doc["answer"], label=False)
258
259 ll_true_choice, _ = rf.loglikelihood(ctx, f" {true_choice}")
260 ll_false_choice, _ = rf.loglikelihood(ctx, f" {false_choice}")
261
262 return ll_true_choice, ll_false_choice
263
264 def process_results(self, doc, results):
265 ll_true_choice, ll_false_choice = results

Callers

nothing calls this directly

Calls 2

format_answerMethod · 0.95
loglikelihoodMethod · 0.45

Tested by

no test coverage detected