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

[Broken] Generation with Sequential Model #854

Closed
satpalsr opened this issue Mar 23, 2023 · 9 comments · Fixed by #1026
Closed

[Broken] Generation with Sequential Model #854

satpalsr opened this issue Mar 23, 2023 · 9 comments · Fixed by #1026
Assignees
Labels
bug Something isn't working help wanted This issue needs assistance

Comments

@satpalsr
Copy link
Contributor

Take up a config and set "pipe-parallel-size": 1
Run python deepy.py generate.py configs/70M-deduped.yml -i input_prompt.txt -o prompt_out.txt
This will bring sequential model in action.

Error: 'SequentialWrapper' object has no attribute 'clear_cache' in line

@satpalsr satpalsr added the bug Something isn't working label Mar 23, 2023
@Quentin-Anthony Quentin-Anthony added the help wanted This issue needs assistance label Mar 27, 2023
@Quentin-Anthony
Copy link
Member

I don't have the bandwidth to handle this for now. Would appreciate if someone can take a look.

@curt-tigges
Copy link
Contributor

Will take a look!

@FourWinds021
Copy link

is this error solved now? I encountered the same problem when I train and inference a 125M GPT2 model according to the guidelines.

@StellaAthena
Copy link
Member

is this error solved now? I encountered the same problem when I train and inference a 125M GPT2 model according to the guidelines.

If you encountered the same problem, it’s safe to say that it’s not solved.

@DaoD
Copy link

DaoD commented Apr 13, 2023

The same problem here. Could you please help to check it?

@yizhilll
Copy link

Same here. Would the temporary comment the line out affect anything?

@Quentin-Anthony
Copy link
Member

Sorry all. This happened due to a line that snuck into the neox 2.0 release. To clarify for all, there are three pipeline parallelism cases in gpt-neox:

(pipe_parallel_size == 0): In this case, the model is wrapped in a standard nn.Sequential module

if not neox_args.is_pipe_parallel:

This is done to reduce memory overhead and latency. This case is rarely used, and is where the issue you're seeing above lies.

(pipe_parallel_size == 1): This is the most common case. The model is wrapped in a single GPT2ModelPipe module, which makes it easier for both DeepSpeed and us to handle. This should be the default case, which we just resolved in #866.

(pipe_parallel_size > 1): This is for large models that require multiple pipeline module stages to distribute the model. This case remains unchanged.

What should you do: If you trained a model and need those weights to stay in a sequential module, we're working on a fix and will share it shortly. If you don't need those weights and instead simply need to run inference on a public model, apply the patch in #866 and run again.

@StellaAthena
Copy link
Member

@satpalsr @FourWinds021 @DaoD @yizhilll have your issues been resolved by the recent patches?

@satpalsr
Copy link
Contributor Author

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted This issue needs assistance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants