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

Method doc_to_target

test/general/lm_eval/tasks/glue.py:187–191  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

185 )
186
187 def doc_to_target(self, doc):
188 # True = entailment
189 # False = contradiction
190 # Neither = neutral
191 return " {}".format({0: "True", 1: "Neither", 2: "False"}[doc["label"]])
192
193 def construct_requests(self, doc, ctx):
194 ll_true, _ = rf.loglikelihood(ctx, " True")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected