mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-08 19:10:56 +00:00
wip add datatypes
This commit is contained in:
parent
99ed1425fc
commit
9816c9aae6
5 changed files with 175 additions and 57 deletions
|
|
@ -111,7 +111,14 @@ def normalize_extracted_answer(extracted_answer: str) -> str:
|
|||
)
|
||||
|
||||
|
||||
class MMLUTask(BaseTask):
|
||||
class MMLUTask(
|
||||
BaseTask[
|
||||
DictSample,
|
||||
InferencePreprocessedSample,
|
||||
InferencePredictionSample,
|
||||
InferencePostprocessedSample,
|
||||
]
|
||||
):
|
||||
"""
|
||||
MMLU Task.
|
||||
"""
|
||||
|
|
@ -120,6 +127,7 @@ class MMLUTask(BaseTask):
|
|||
super().__init__(dataset, *args, **kwargs)
|
||||
|
||||
def preprocess_sample(self, sample):
|
||||
print(sample)
|
||||
content = QUERY_TEMPLATE_MULTICHOICE.format(**sample)
|
||||
return {
|
||||
"role": "user",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue