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

Method doc_to_text

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

Source from the content-addressed store, hash-verified

401 return self.dataset["validation"]
402
403 def doc_to_text(self, doc):
404 return "Sentence 1: {}\nSentence 2: {}\nQuestion: Do both sentences mean the same thing?\nAnswer:".format(
405 general_detokenize(doc["sentence1"]),
406 general_detokenize(doc["sentence2"]),
407 )
408
409 def doc_to_target(self, doc):
410 return " {}".format(yesno(doc["label"]))

Callers

nothing calls this directly

Calls 1

general_detokenizeFunction · 0.90

Tested by

no test coverage detected