MCPcopy Index your code
hub / github.com/VHellendoorn/Code-LMs / ppl

Function ppl

Evaluation/eval_codex_all.py:21–22  ·  view source on GitHub ↗
(avg_logprob)

Source from the content-addressed store, hash-verified

19endoftext_token = '<|endoftext|>'
20
21def ppl(avg_logprob):
22 return 2 ** (-avg_logprob / math.log(2))
23
24def call_codex(code_str, save_probs):
25 eos_code_str = endoftext_token + code_str

Callers 1

eval_codex_all.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected