EleutherAI / concept-erasure

Erasing concepts from neural representations with provable guarantees
MIT License
209 stars 15 forks source link

Basic support for complex numbers #9

Closed norabelrose closed 1 year ago

norabelrose commented 1 year ago

LeaceFitter, OracleFitter, and QuadraticFitter now don't crash when you feed them complex64 or complex128 inputs, and pass basic tests checking that their statistics are at least computed correctly when using complex-valued vector representations.

Also, as a bonus, this PR includes the QuadraticEditor class for doing edits other than simple erasures using the stats from a QuadraticFitter.