From 160b8b593a81c9ffb806e6df43b4f3e9b246cf72 Mon Sep 17 00:00:00 2001 From: Lunwen He Date: Mon, 28 Oct 2024 12:18:35 -0700 Subject: [PATCH] upgrade lm_eval to 0.4.5 ghstack-source-id: e9b27a6dae61a762923bb09a6d439a87f93032f4 Pull Request resolved: https://github.com/pytorch/executorch/pull/6533 --- examples/models/llama/evaluate/eager_eval.py | 2 +- examples/models/llama/install_requirements.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/models/llama/evaluate/eager_eval.py b/examples/models/llama/evaluate/eager_eval.py index e931c60c18..d7f4dae78f 100644 --- a/examples/models/llama/evaluate/eager_eval.py +++ b/examples/models/llama/evaluate/eager_eval.py @@ -31,7 +31,7 @@ def __init__( use_kv_cache: bool = False, ): device = "cuda" if torch.cuda.is_available() else "cpu" - super().__init__(device=device) + super().__init__(device=device, pretrained="gpt2") self._model = model self._tokenizer = tokenizer self._device = torch.device(device) diff --git a/examples/models/llama/install_requirements.sh b/examples/models/llama/install_requirements.sh index 470e804c2d..3103daeb7d 100755 --- a/examples/models/llama/install_requirements.sh +++ b/examples/models/llama/install_requirements.sh @@ -15,7 +15,7 @@ pip install --no-use-pep517 "git+https://github.com/pytorch/ao.git@${TORCHAO_VER # Install lm-eval for Model Evaluation with lm-evalution-harness # Install tiktoken for tokenizer -pip install lm_eval==0.4.2 +pip install lm_eval==0.4.5 pip install tiktoken blobfile # Call the install helper for further setup