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

Method doc_to_text

test/general/lm_eval/tasks/anli.py:62–72  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

60 return self.dataset["test_r" + str(self.SPLIT)]
61
62 def doc_to_text(self, doc):
63 # OA does this a bit weirdly: they prepend "anli 1: anli 1: " to the beginning
64 # of the prompt (yes, repeating it!). also, " True, False, or Neither?" is directly
65 # appended onto the question, with no "Answer:" or even a newline. Do we *really*
66 # want to do it exactly as OA did?
67 return (
68 doc["premise"]
69 + "\nQuestion: "
70 + doc["hypothesis"]
71 + " True, False, or Neither?\nAnswer:"
72 )
73
74 def should_decontaminate(self):
75 return True

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected