"profiler/src/profile_grouped_conv_bwd_weight.cpp" did not exist on "1085794df3c6568832252ee7f2a06a72e488891d"
Unverified Commit 38c74278 authored by Stella Biderman's avatar Stella Biderman Committed by GitHub
Browse files

Merge pull request #537 from gakada/mmlu

Add MultipleChoiceExactTask
parents cc4eab6a c2fcf688
...@@ -743,6 +743,20 @@ class MultipleChoiceTask(Task): ...@@ -743,6 +743,20 @@ class MultipleChoiceTask(Task):
} }
class MultipleChoiceExactTask(MultipleChoiceTask):
def construct_requests(self, doc, ctx):
return rf.loglikelihood(ctx, self.doc_to_target(doc))[1]
def process_results(self, doc, results):
return {"acc": 1.0 if results[0] else 0.0}
def higher_is_better(self):
return {"acc": True}
def aggregation(self):
return {"acc": mean}
class PerplexityTask(Task, abc.ABC): class PerplexityTask(Task, abc.ABC):
def should_decontaminate(self): def should_decontaminate(self):
"""Whether this task supports decontamination against model training set.""" """Whether this task supports decontamination against model training set."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment