-
Notifications
You must be signed in to change notification settings - Fork 76
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
Bringing laplace-torch to foundation-model era #144
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n arbitrary parameter indices as in SubnetLaplace, but per-parameter (i.e. weight, bias) subsets.
…softmax) in NN predictive; 3. Pass model kwargs in NN predictive.
…rec; add support for softmax temp for classification predictive
Add support for cross entropy loss inputs with multiple leading dimensions
This was referenced Apr 23, 2024
This was referenced Apr 25, 2024
I replaced |
…t on the likelihood
Might as well fixes #156 while we're at it. |
aleximmer
reviewed
Apr 26, 2024
aleximmer
reviewed
Apr 26, 2024
This was referenced Apr 26, 2024
All tasks finished! |
This was referenced Apr 26, 2024
Merged
Double-checked and everything looks fine! Merging this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main features of this pull request:
classification
likelihood. E.g. the logits is(batch_size, seq_len, n_classes)
. Useful for language modeling and reward modeling.integrate-latest-asdl
changes. I tested it with my ASDL fork (only a couple of light changes to support weight-sharing dim andignore_index
; so crucial in language modeling): https://github.com/wiseodd/asdl/commits/dev/. Please also check this and let me know what's the most elegant way.x
is aUserDict
containinginput_ids
,attention_mask
, etc., things that are produced by HF dataloader.reward_modeling
where theclassification
likelihood is used during training and theregression
likelihood is used during prediction.torchmetrics
for gridsearch. The benefit is that it supports running metrics => less memory overhead (vis-a-vis gathering all the logits first).torch.func
(functorch
, really) as a general Jacobian computation for GLM predictive. Useful for Bayesian optimization/invariance learning where you need to backprop through the variance. Much more elegant than to change ASDL.Relevant unit tests are provided. All tests passed; the only ones failed are the old
LowRankLaplace
issues.