-
Notifications
You must be signed in to change notification settings - Fork 542
upgrade lm_eval to 0.4.5 #6533
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
upgrade lm_eval to 0.4.5 #6533
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6533
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 999c02d with merge base 2c32bf3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@helunwencser has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this hack will make the newer version happy by giving it a valid HF model_repo though it won't be used to eval at all. Maybe put a comment for this?
We have been using a pretty old `lm_eval` version. This is blocking us from upgrading other libraries like `transformers` and blocking some others work. For example, #6489. In newer versions `lm_eval`, `pretrainedModel` becomes a required parameter. In 0.4.2, it defaults to `gpt2` if not provided. This PR upgrades our `lm_eval` version to the latest version 0.4.5 and set `pretrainedModel` to its original default value `gpt2`. Test Plan: Run eval before and after this PR. Make sure the perplexity number stays around the same. <img width="682" alt="Screenshot 2024-10-28 at 12 22 45 PM" src="https://github.com/user-attachments/assets/f7bccc55-ad5a-4f90-8eae-eefdd8e9997a"> Differential Revision: [D65079913](https://our.internmc.facebook.com/intern/diff/D65079913) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D65079913 |
ec5ece5
into
gh/helunwencser/64/base
Pull Request resolved: #6533 We have been using a pretty old `lm_eval` version. This is blocking us from upgrading other libraries like `transformers` and blocking some others work. For example, #6489. In newer versions `lm_eval`, `pretrainedModel` becomes a required parameter. In 0.4.2, it defaults to `gpt2` if not provided. This PR upgrades our `lm_eval` version to the latest version 0.4.5 and set `pretrainedModel` to its original default value `gpt2`. Differential Revision: [D65079913](https://our.internmc.facebook.com/intern/diff/D65079913/) ghstack-source-id: 250754584 Co-authored-by: Lunwen He <[email protected]>
Stack from ghstack (oldest at bottom):
We have been using a pretty old
lm_eval
version. This is blocking us from upgrading other libraries liketransformers
and blocking some others work. For example, #6489.In newer versions
lm_eval
,pretrainedModel
becomes a required parameter. In 0.4.2, it defaults togpt2
if not provided. This PR upgrades ourlm_eval
version to the latest version 0.4.5 and setpretrainedModel
to its original default valuegpt2
.Test Plan:

Run eval before and after this PR. Make sure the perplexity number stays around the same.
Differential Revision: D65079913