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

Method doc_to_text

test/general/lm_eval/tasks/pawsx.py:76–84  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

74 return self.dataset["test"]
75
76 def doc_to_text(self, doc):
77 # same as in mGPT paper
78 return (
79 doc["sentence1"]
80 + ", "
81 + self.QUESTION_WORD
82 + "? [MASK], "
83 + doc["sentence2"]
84 )
85
86 def doc_to_target(self, doc):
87 return " " + [self.YES, self.NO][doc["label"]]

Callers 2

doc_to_fewshot_promptMethod · 0.95
fewshot_contextMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected