Descriptions:
Simplify generation intervention to have default mode of argument-less with just the base input. The default mode is inference-time intervention where we intervene on each decoding step now.
Cleanup intervention initialization with lazy dict variable passing, instead of hard coded arguments. Refactory existing code for readability.
Testing Done:
WARNING:root:Loading trainable intervention from intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Loading trainable intervention from intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
Directory './test_output_dir_prefix-9647b9' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:The key is provided in the config. Assuming this is loaded from a pretrained module.
WARNING:root:Loading trainable intervention from intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Loading trainable intervention from intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Directory './test_output_dir_prefix-2701e4' created successfully.
.Directory './test_output_dir_prefix-87c463' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Removing testing dir ./test_output_dir_prefix-8f8fad
Removing testing dir ./test_output_dir_prefix-364dae
Removing testing dir ./test_output_dir_prefix-9647b9
Removing testing dir ./test_output_dir_prefix-2701e4
Removing testing dir ./test_output_dir_prefix-87c463
----------------------------------------------------------------------
Ran 31 tests in 84.541s
OK```
Descriptions: Simplify generation intervention to have default mode of argument-less with just the base input. The default mode is inference-time intervention where we intervene on each decoding step now.
Cleanup intervention initialization with lazy dict variable passing, instead of hard coded arguments. Refactory existing code for readability.
Testing Done: