Skip to content
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

AssertionError: You can't use same Accelerator() instance with multiple models when using DeepSpeed #87

Open
well0203 opened this issue May 18, 2024 · 2 comments

Comments

@well0203
Copy link

Hi, thank you for your work again.
I have another question: How did you train models with multiple iterations if "AssertionError: You can't use same Accelerator() instance with multiple models when using DeepSpeed."
I set --itr 2 and got this error. I am wondering, how you solved this issue? Did you just run main scripts one by one and then averaged results with different seeds, or you fixed it somehow in main script so that it supports multiple models/iterations?
I am asking, because I did not find stable solution or fix around, because DeepSpeed currently supports only one model.
Thank you in advance.

@kwuking
Copy link
Collaborator

kwuking commented May 27, 2024

Hi, we obtain the final results by running multiple epochs. Additionally, we will try to repeat this experiment multiple times to obtain several sets of results and calculate the average value.

@well0203
Copy link
Author

Hi, we obtain the final results by running multiple epochs. Additionally, we will try to repeat this experiment multiple times to obtain several sets of results and calculate the average value.

Sorry, I did not understand your answer. I mean, you run a model multiple times and then average results (from your paper). In the run_main.py script you have --itr parameter to perform same experiment multiple times (run the same model with same parameters more than once). But when I set itr to more than 1, I get this error, because Accelerate does not support multiple models. I hope I could clarify my previous question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants