Skip to content

hook up hf + moe + nvfp4 script to lm_eval - #4321

Merged
vkuzo merged 48 commits into
mainfrom
gh/vkuzo/257/head
Apr 23, 2026
Merged

hook up hf + moe + nvfp4 script to lm_eval#4321
vkuzo merged 48 commits into
mainfrom
gh/vkuzo/257/head

Conversation

@vkuzo

@vkuzo vkuzo commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary:

Adds a very simple lm_eval call to the hf + moe + nvfp4 example script.
With a small fix in the transformers repo
(huggingface/transformers#45609), it works!

The script itself is throwaway, just a proof that things work e2e on
single GPU.

Test Plan:

> time python scripts/prototype/test_nvfp4_moe.py --recipe=bf16 --run_lm_eval

| Tasks  |Version|Filter|n-shot|    Metric     |   |Value |   |Stderr|
|--------|------:|------|-----:|---------------|---|-----:|---|------|
|wikitext|      2|none  |     0|bits_per_byte  |↓  |0.5895|±  |   N/A|
|        |       |none  |     0|byte_perplexity|↓  |1.5047|±  |   N/A|
|        |       |none  |     0|word_perplexity|↓  |8.8910|±  |   N/A|

real    0m37.922s

> time python scripts/prototype/test_nvfp4_moe.py --recipe=nvfp4 --run_lm_eval

| Tasks  |Version|Filter|n-shot|    Metric     |   |Value |   |Stderr|
|--------|------:|------|-----:|---------------|---|-----:|---|------|
|wikitext|      2|none  |     0|bits_per_byte  |↓  |0.6024|±  |   N/A|
|        |       |none  |     0|byte_perplexity|↓  |1.5183|±  |   N/A|
|        |       |none  |     0|word_perplexity|↓  |9.3277|±  |   N/A|

real    0m32.234s

vkuzo added 30 commits April 20, 2026 20:52
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 7 commits April 23, 2026 09:27
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo

vkuzo commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

@vkuzo
vkuzo requested a review from jerryzh168 as a code owner April 23, 2026 15:52
@pytorch-bot

pytorch-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4321

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

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

@meta-cla meta-cla 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 Apr 23, 2026
@vkuzo vkuzo added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Apr 23, 2026
vkuzo added 4 commits April 23, 2026 17:21
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 6 commits April 23, 2026 18:44
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo
vkuzo changed the base branch from gh/vkuzo/256/head to main April 23, 2026 18:46
@vkuzo
vkuzo merged commit 67a78e5 into main Apr 23, 2026
19 of 23 checks passed
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. module: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants