Skip to content

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

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

helunwencser
Copy link
Contributor

@helunwencser helunwencser commented Oct 28, 2024

Stack from ghstack (oldest at bottom):

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.
Screenshot 2024-10-28 at 12 22 45 PM

Differential Revision: D65079913

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Oct 28, 2024

🔗 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 Failures

As of commit 999c02d with merge base 2c32bf3 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

helunwencser added a commit that referenced this pull request Oct 28, 2024
ghstack-source-id: e9b27a6
Pull Request resolved: #6533
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 28, 2024
@helunwencser
Copy link
Contributor Author

@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")
Copy link
Contributor

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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65079913

@facebook-github-bot facebook-github-bot merged commit ec5ece5 into gh/helunwencser/64/base Oct 29, 2024
46 of 48 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/helunwencser/64/head branch October 29, 2024 21:51
helunwencser added a commit that referenced this pull request Oct 30, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants