Skip to content

upgrade lm_eval to 0.4.5 #6555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/models/llama/evaluate/eager_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -47,6 +47,10 @@ def eot_token_id(self):
return self._tokenizer.eot_id
return self._tokenizer.eos_id

@property
def prefix_token_id(self):
return self._tokenizer.eos_id

@property
def max_length(self):
return self._max_seq_length
Expand Down
2 changes: 1 addition & 1 deletion examples/models/llama/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading