MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / construct_requests

Method construct_requests

lm-eval-harness/lm_eval/tasks/scrolls/task.py:314–339  ·  view source on GitHub ↗
(self, doc, ctx, **kwargs)

Source from the content-addressed store, hash-verified

312 return {"f1": (prediction, doc["outputs"])}
313
314 def construct_requests(self, doc, ctx, **kwargs):
315 if doc["is_yes_no"]:
316 return [
317 Instance(
318 request_type="loglikelihood",
319 doc=doc,
320 arguments=(ctx, " yes"),
321 idx=0,
322 **kwargs,
323 ),
324 Instance(
325 request_type="loglikelihood",
326 doc=doc,
327 arguments=(ctx, " no"),
328 idx=1,
329 **kwargs,
330 ),
331 ]
332 else:
333 return Instance(
334 request_type="generate_until",
335 doc=doc,
336 arguments=(ctx, {"until": ["\n"]}),
337 idx=0,
338 **kwargs,
339 )
340
341
342class QuALITY(_SCROLLSMultipleChoiceTask):

Callers

nothing calls this directly

Calls 1

InstanceClass · 0.90

Tested by

no test coverage detected