Skip to content

Re-enable hessian_dtype - #356

Merged
luciaquirke merged 1 commit into
mainfrom
fix/hessian-dtype-lambda
Jul 24, 2026
Merged

Re-enable hessian_dtype#356
luciaquirke merged 1 commit into
mainfrom
fix/hessian-dtype-lambda

Conversation

@luciaquirke

@luciaquirke luciaquirke commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator
  • LambdaCollector gains a dtype field: eigenvectors are cast once at setup, activations/gradients at the hooks, so rotation + squared accumulation and the saved shards all run in the requested dtype.
  • approximate_hessians passes hessian_dtype to both collector branches; the SOURCE precompute_checkpoints lambda worker does the same.
  • New fp64 option for hessian_dtype (config Literal + convert_precision_to_torch).

Tests

tests/ekfac_tests/test_hessian_dtype.py: pins the accumulation and saved-shard dtype through both collectors (fp64/fp16/fp32) and the fp64 conversion. Full tests/ekfac_tests + tests/test_hessian.py: 76 passed, 4 skipped.

hessian_dtype only reached the covariance collectors — the eigenvalue-
correction pass ignored it and accumulated in the activations' dtype. Pass it
to LambdaCollector in both the standard and per-checkpoint (SOURCE) paths,
and add an fp64 option for kronfluence-parity precision studies.
@luciaquirke luciaquirke changed the title Thread hessian_dtype into the EK-FAC lambda collector; add fp64 Re-enable hessian_dtype Jul 24, 2026
@luciaquirke
luciaquirke merged commit 2671534 into main Jul 24, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

1 participant