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

Method doc_to_text

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

Source from the content-addressed store, hash-verified

122 return self.dataset["validation"]
123
124 def doc_to_text(self, doc):
125 return "{}\nQuestion: Is this sentence positive or negative?\nAnswer:".format(
126 general_detokenize(doc["sentence"]),
127 )
128
129 def doc_to_target(self, doc):
130 return " {}".format({1: "positive", 0: "negative"}[doc["label"]])

Callers

nothing calls this directly

Calls 1

general_detokenizeFunction · 0.90

Tested by

no test coverage detected