-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Privacy&Security: Network Contact Every Model Load #15927
Comments
cc @LysandreJik @Narsil This relates to things we talked about internally. I agree with the first point, the second and third point deserve their debate so thank you for writing this issue! For the fourth point, the situation is a bit more complicated as every user would need to download the whole repo when using a model, even if they don't need all the files (for instance most downloaded models have weights in PyTorch, TF and Flax). |
Thanks @xloem, Thank you for writing this ! Here are my initial thoughts (just trying to bring food for thought)
Yes, probably with a warning so that users are aware they might not be using the latest version. (There's a flag
We should still be careful that some users might actually be testing the updates to their model that they do by pushing on the hub. IMO a global form of caching to bypass network should be opt-in, not opt-out. And indeed it would be very nice to have.
Arguable, but it's also a nice thing when I upload a model while training to see the changes happening live.
Agree with @sgugger , as long as multiple files for weights are on the hub, doing a full git clone seems hard. One element in favor of "repo" based caching would be to reduce the number of HEAD calls during |
When you say an attacker triggering many updates on a model is an issue that goes beyond SSL, could you elaborate more on what you mean and why you might generally require users to enable a more secure setup, rather than having it a default? With transformers getting larger and larger, it seems the centralisation and frequent default network downloads for models could become a significant danger to nations. As someone who's worked with wireshark and implemented man in the middle attacks, I see network access as an opportunity for a network peer to mutate the data received, each request. It isn't a complex, impossible thing: the protocols are all public and people study them. This can be mitigated by making it nondefault or even emitting output when HEAD requests are made. I see that changing the default behavior could make things harder for people with existing setups that rely on the network behavior, but the plan could still be made for a future major release. As someone who's worked with git a lot, I don't understand well the concerns around the git clone. git-lfs is a separate system from git, and has support for download of individual files. git also has partial filter cloning now that can prevent download of unneeded git objects, although it isn't well documented in my experience. I agree that enabling all these inside python is an engineering challenge. The value of using git repositories is that it exposes the backend to the user and their administrators so they can perform their own audits and review changes provided by model updates. Just thoughts. Thanks for keeping this issue open. |
we had an internal (?) discussion about changing the cached file layout to better map with Does anyone remember where this discussion was? |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I decided to add this after commenting on deepset-ai/haystack#2118
Who can help
@sgugger
Information
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
This is a multifaceted situation, and each part is valuable in its own right.
I have memory and accuracy issues and may have already opened a similar issue to this, or stated something slightly false above. If so, I apologise. I wanted to take responsibility for my comments in the project linked at top.
The text was updated successfully, but these errors were encountered: