aleximmer / Laplace

Laplace approximations for Deep Learning.
https://aleximmer.github.io/Laplace
MIT License
458 stars 71 forks source link

Cache features in LLLA with MC predictive #164

Closed wiseodd closed 5 months ago

wiseodd commented 5 months ago

Currently it is done via multiple forward passes over the entire model, even if the non-last layers are constant. https://github.com/aleximmer/Laplace/blob/f14afc45094bb6e08c19800ecd9ea6a36548b827/laplace/lllaplace.py#L139-L144

Very relevant for large foundation models.

wiseodd commented 5 months ago

Duplicate #161