-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Revert "[SLM] Allow modules to define pre-processing of weights" #16777
Revert "[SLM] Allow modules to define pre-processing of weights" #16777
Conversation
…)" This reverts commit 1cccc3b.
@tqchen Can you add a unit test demonstrating the behavior to be retained? Is it only for the string names of symbolic variables, as mentioned in this comment? |
Likely i think it would be primarily two parameters with same |
Happy to also test followup redos of the PR in case we miss other cases |
I replied with a test to the other PR before noticing the on-going thread here. #16757 (comment) @tqchen so could you help pasting it into |
Merged without the unit test to keep the reversion standalone. Let's add the test case separately. Thank you folks! |
I have a parametrized version of the test case, along with testing for cases beyond |
Follow-up to apache#16777, add unit tests demonstrating desired behavior.
Prior to this commit, the weights used by `nn.Module` instances were required to be `nn.Parameter` instances. This commit allows the weights to instead be `nn.Tensor` instances, defined in terms of other `nn.Parameter` weights. This allows a model to define both the original weights that would be present in an external checkpoint (e.g. a Pytorch or Safetensors file), and the pre-processing that should be performed on those weights. This is a re-implementation of apache#16757, which was reverted in apache#16777. The re-implementation preserves the handling of dynamic shapes specified as python strings, enabling the test cases that were added in apache#16784.
* [SLM] Add unit tests for SLM to Relax exporter Follow-up to #16777, add unit tests demonstrating desired behavior. * Updated docstrings based on review comment
…che#16777) Revert "[SLM] Allow modules to define pre-processing of weights (apache#16757)" This reverts commit 1cccc3b.
* [SLM] Add unit tests for SLM to Relax exporter Follow-up to apache#16777, add unit tests demonstrating desired behavior. * Updated docstrings based on review comment
Reverts #16757