mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-10 06:14:58 +00:00
⚡ add humaneval support
This commit is contained in:
parent
216a63b858
commit
dc10480ef6
7 changed files with 130 additions and 4 deletions
|
@ -59,8 +59,8 @@ class DataEvaluator:
|
|||
:param text: The raw prediction string.
|
||||
:return: Processed prediction string.
|
||||
"""
|
||||
text = text.lstrip('\n').split('\n')[0]
|
||||
return text[:1]
|
||||
text = text.lstrip('\n').split('\n')[-1]
|
||||
return text[-1:]
|
||||
|
||||
def score(self, pred, answers):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue