Skip to content

[P0] Making RepresentationConfig a PretrainedConfig object #157

Open
@frankaging

Description

@frankaging

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions