-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I was training and saving REFT modules for the RoBERTa model. But loading them seems to be not possible with the current implementation. I get the following Error:
Traceback (most recent call last):
File "/mnt/home/pyreft/examples/loreft/eval_nusaX.py", line 159, in <module>
main()
File "/mnt/home/pyreft/examples/loreft/eval_nusaX.py", line 57, in main
reft_model = pyreft.ReftModel.load(
File "/mnt/home/pyreft/pyreft/reft_model.py", line 26, in load
model = pv.IntervenableModel.load(*args, **kwargs)
File "/mnt/home/miniconda3/envs/reft/lib/python3.10/site-packages/pyvene/models/intervenable_base.py", line 550, in load
intervenable = IntervenableModel(saving_config, model)
File "/mnt/home/miniconda3/envs/reft/lib/python3.10/site-packages/pyvene/models/intervenable_base.py", line 116, in __init__
component_dim = get_dimension_by_component(
File "/mnt/home/miniconda3/envs/reft/lib/python3.10/site-packages/pyvene/models/modeling_utils.py", line 101, in get_dimension_by_component
if component not in type_to_dimension_mapping[model_type]:
KeyError: <class 'transformers.models.roberta.modeling_roberta.RobertaForSequenceClassification'>
It looks like type_to_dimension_mapping
does not include RoBERTa or does RoBERTa fall under one of the existing models?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested