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

Method _process_doc

test/general/lm_eval/tasks/hellaswag.py:53–60  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

51 return map(self._process_doc, self.dataset["validation"])
52
53 def _process_doc(self, doc):
54 ctx = doc["ctx_a"] + " " + doc["ctx_b"].capitalize()
55 out_doc = {
56 "query": self.preprocess(doc["activity_label"] + ": " + ctx),
57 "choices": [self.preprocess(ending) for ending in doc["endings"]],
58 "gold": int(doc["label"]),
59 }
60 return out_doc
61
62 @classmethod
63 def preprocess(cls, text):

Callers

nothing calls this directly

Calls 1

preprocessMethod · 0.95

Tested by

no test coverage detected