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

Method process_results

lm-eval-harness/lm_eval/api/task.py:1458–1466  ·  view source on GitHub ↗
(self, doc: dict, results: float)

Source from the content-addressed store, hash-verified

1456 )
1457
1458 def process_results(self, doc: dict, results: float) -> dict:
1459 (loglikelihood,) = results
1460 words = self.count_words(self.doc_to_target(doc))
1461 bytes_ = self.count_bytes(self.doc_to_target(doc))
1462 return {
1463 "word_perplexity": (loglikelihood, words),
1464 "byte_perplexity": (loglikelihood, bytes_),
1465 "bits_per_byte": (loglikelihood, bytes_),
1466 }
1467
1468 def aggregation(self) -> dict:
1469 return {

Callers

nothing calls this directly

Calls 3

count_wordsMethod · 0.95
doc_to_targetMethod · 0.95
count_bytesMethod · 0.95

Tested by

no test coverage detected