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

Method append_context

test/general/lm_eval/tasks/winogrande.py:102–105  ·  view source on GitHub ↗
(cls, ctx, partial_ctx)

Source from the content-addressed store, hash-verified

100
101 @classmethod
102 def append_context(cls, ctx, partial_ctx):
103 ctx = ctx.split("\n\n") # Each fewshot context is on its own new line.
104 ctx.pop() # Remove the correct context put in by `doc_to_text`.
105 return "\n\n".join([*ctx, partial_ctx]) if ctx else partial_ctx
106
107 def process_results(self, doc, results):
108 """Take a single document and the LM results and evaluates, returning a

Callers 1

construct_requestsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected