Skip to content

Commit

Permalink
Merge pull request #21 from cdoern/cpu
Browse files Browse the repository at this point in the history
add cpu support for MMLU bench
  • Loading branch information
nathan-weinberg authored Jun 26, 2024
2 parents 8494a51 + db228c2 commit caa1e4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/instructlab/eval/mmlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Third Party
from lm_eval.evaluator import simple_evaluate # type: ignore
from lm_eval.tasks import TaskManager # type: ignore
import torch

# First Party
from instructlab.eval.evaluator import Evaluator
Expand Down Expand Up @@ -58,6 +59,7 @@ def run(self) -> tuple:
tasks=self.tasks,
num_fewshot=self.few_shots,
batch_size=self.batch_size,
device=("cuda" if torch.cuda.is_available() else "cpu"),
)

results = mmlu_output["results"]
Expand Down

0 comments on commit caa1e4c

Please sign in to comment.