Closed Mayukhdeb closed 2 years ago
Thank you for trying out this code! You need to add the argument model_type=model_type(MODEL_NAME)
to the KnowledgeNeurons
wrapped. The purpose of this is to tell the code what HF Transformer class to use. You can see here that this defaults to "bert"
which is why the bert example works.
Best of luck with your experiments!
When I initialize
KnowledgeNeurons
withmodel_name = 'gpt2'
, I get anAttributeError
when trying to runget_refined_neurons()
The following snippet would be able to reproduce the error on a colab notebook:
Given below is the full traceback: