GPU memory safety

#2
by sk16er - opened

core.py (Dynamic VRAM Safety): Enclosed the core mechanistic interpretability hooks and activation-steering logic within strict try...finally resource execution boundaries. This guarantees that intermediate Multi-Layer Perceptron (MLP) tensors are explicitly deallocated from GPU memory, preventing unhandled runtime interruptions from causing persistent CUDA Out-Of-Memory (OOM) leaks.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment