timaeus-research / devinterp

Tools for studying developmental interpretability in neural networks.
71 stars 14 forks source link

Fix seeding across chains & in init_loss (NB seeding not backwards reproducible) #98

Closed svwingerden closed 1 week ago

svwingerden commented 1 week ago

Fixes two issues with seeding:

  1. if seed was passed to sample while num_chains was >1, then seed n chain i+1 would be the exact same as seed n+1 chain i-1, which means seeds n and n+1 were not independent.
  2. init_loss was not seeded, causing slight variations in otherwise reproducible runs.

These issues are now fixed. Also changed some tests around to adjust for this fix