Open Shiroha-Offical opened 1 week ago
@Shiroha-Offical Next version of nnsight will allow you to use conditionals (if statements in general) ! If you want to give it a try now you can pip install --upgrade git+https://github.com/ndif-team/nnsight.git@0.4
. Id love to hear back your experience.
I'm trying to intervene the modules in .generate call with some conditions by self-defined prober. However, the conditions are calculated by the activations before exiting the tracing context. Therefore, I couldn't do anything without the value of the condition features.
Here are my desired behavior with demonstration in code and error during attempts:
I manage to calculate the probe_proba with nnsight.apply, but I could not get the probe_proba to distinguish whether to do func
I will be grateful for any help you can provide.