Open frankaging opened 1 month ago
Descriptions:
Currently, RepresentationConfig is defined as a namedtuple, https://github.com/stanfordnlp/pyvene/blob/main/pyvene/models/configuration_intervenable_model.py#L11C1-L13C28. This makes new arguments really hard to be added into the config, and cause a lot of saving and loading issues when the config gets larger. One good thing about this config is that all the fields are primitive types, and are serializable.
RepresentationConfig
The solution is to turn RepresentationConfig into another HuggingFace PretrainedConfig object which is more extensible, and all the saving and loading are already handled by PretrainedConfig itself.
Descriptions:
Currently,
RepresentationConfig
is defined as a namedtuple, https://github.com/stanfordnlp/pyvene/blob/main/pyvene/models/configuration_intervenable_model.py#L11C1-L13C28. This makes new arguments really hard to be added into the config, and cause a lot of saving and loading issues when the config gets larger. One good thing about this config is that all the fields are primitive types, and are serializable.The solution is to turn
RepresentationConfig
into another HuggingFace PretrainedConfig object which is more extensible, and all the saving and loading are already handled by PretrainedConfig itself.