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

DPMultiheadedAttention is not a full drop in replacement for nn.MultiheadAttention #596

Closed
jfb54 opened this issue Jul 7, 2023 · 3 comments

Comments

@jfb54
Copy link

jfb54 commented Jul 7, 2023

🐛 Bug

Not only is the API missing the batch_first parameter (#512), it is missing the in_proj_weight parameter. Thus it makes it impossible to use Opacus with a transformer.

Expected behavior

Ability to access the in_proj_weight parameter so that it may be initialized.

Environment

Opacus 1.4
PyTorch 2.01

@HuanyuZhang
Copy link
Contributor

Thanks for reporting bugs. Will fix it and #512 to make it work.

@tranvansang
Copy link

I am facing the same issue. In addition to what described in the issue description, forward() call also lacks is_causal parameter.

@HuanyuZhang
Copy link
Contributor

HuanyuZhang commented Dec 6, 2023

Closed this issue, since we launched fixes in PR(#598). Btw, it is also feasible to use (https://github.com/lxuechen/private-transformers) for transformers in hugging face.

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

3 participants