-
Notifications
You must be signed in to change notification settings - Fork 254
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
hf_Bert_large failed #2263
Comments
Can you try this version of transformers? |
@FindHao I checked my environment and make sure that the version of transformers is 4.38.1, and the issue is still exists. |
@FindHao BTW, I tried to build a docker with the dockerfile from the repo and ran the same test, the model hf_Bert_large still failed with the same issue, looks the environment to run the dashboard is different? |
The torchbench in dynamo is slightly different from this repo. You can try the above PR I submitted to solve this issue. Or, you can run with this repo's |
Summary: Fixes #2263. According to https://github.com/pytorch/pytorch/blob/main/benchmarks/dynamo/common.py#L509, example_inputs are formatted as dictionaries for HuggingFace models. However, this forward_pass function passes all inputs to mod with *, which may only pass the input_ids key in HuggingFace model's example inputs. To reproduce, run the following command. ```bash python pytorch/benchmarks/dynamo/torchbench.py --performance --inference -dcuda --only=hf_Bert --output=torchbench_inference.csv ``` X-link: pytorch/pytorch#126579 Approved by: https://github.com/xuzhao9 Reviewed By: DanilBaibak Differential Revision: D57619425 Pulled By: FindHao fbshipit-source-id: 9074e227bab949c83768092cf019dfd590fe947b
@FindHao Thanks for the fixing, it works for inference, there is another similar bug in pytorch benchmark repo: https://github.com/pytorch/pytorch/blob/main/benchmarks/dynamo/torchbench.py#L435 I think it should be "if isinstance(cloned_inputs, dict):" , which looks like a typo, and the hf model training will fail because of this. thanks |
Thanks for your reply! It is a typo. Fixed in pytorch/pytorch#126981 |
Hi
I can't run the hf_Bert_large model on my local site, I was running it from pytorch repo and my command is:
./benchmarks/dynamo/torchbench.py --performance --inference --bfloat16 --backend=inductor --only=hf_Bert_large --output=torchbench_inference.csv
the error message is:
looks something wrong with the input.
I found that this model is good to run on dashboard,
https://hud.pytorch.org/benchmark/torchbench/inductor_max_autotune?startTime=Mon,%2006%20May%202024%2010:12:38%20GMT&stopTime=Mon,%2013%20May%202024%2010:12:38%20GMT&granularity=hour&mode=training&model=hf_Bert_large&dtype=amp&lBranch=main&lCommit=02093b6c6ae1046368e2500881d0bb5880873386&rBranch=main&rCommit=68a1f787c8ce0783f39c35a91fa1e6614b974050
anybody can help to resolve this issue? many thanks.
The text was updated successfully, but these errors were encountered: