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

Method construct_requests

test/general/lm_eval/tasks/blimp.py:87–95  ·  view source on GitHub ↗
(self, doc, ctx)

Source from the content-addressed store, hash-verified

85 return ""
86
87 def construct_requests(self, doc, ctx):
88 assert not ctx
89
90 # Calculate the loglikelihood for the good and the bad sentence.
91 # Note that loglikelihood translates the "" prefix to the "<|endoftext|>" token
92 return [
93 rf.loglikelihood("", doc["sentence_good"]),
94 rf.loglikelihood("", doc["sentence_bad"]),
95 ]
96
97 def process_results(self, doc, results):
98 likelihood1, likelihood2 = results

Callers

nothing calls this directly

Calls 1

loglikelihoodMethod · 0.45

Tested by

no test coverage detected