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

DeepSpeed Zero Init + PEFT Number of Parameters #139

Closed
zanussbaum opened this issue Feb 27, 2023 · 0 comments
Closed

DeepSpeed Zero Init + PEFT Number of Parameters #139

zanussbaum opened this issue Feb 27, 2023 · 0 comments

Comments

@zanussbaum
Copy link
Contributor

Thanks for a great package, this is great for training some large models.

As far as I can tell when using DeepSpeed Zero3 with Accelerate, the model by default gets loaded with empty weights. But if I were using this and ran the following code snippet

model = AutoModelForCausalLM.from_pretrained(config["model_path"])
model = get_peft_model(model, peft_config)
model.print_trainable_parameters()

it would print something like
trainable params: 3670016 || all params: 3670016 || trainable%: 100.0

In a perfect world, it should print the true number of params (including empty ones)

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