i-machine-think / diagNNose

diagNNose is a Python library that facilitates a broad set of tools for analysing hidden activations of neural models.
https://diagnnose.readthedocs.io
MIT License
81 stars 8 forks source link

Add option for loading transformer model from file path #87

Closed oskarvanderwal closed 2 years ago

oskarvanderwal commented 2 years ago

It is currently not possible to pass a file path for loading a transformer model, only a transformer_type. I would like to run the syntax.py script for finetuned BERT models that I have saved locally. You could for example add another option for passing a file path here.

oskarvanderwal commented 2 years ago

No changes are required after all, it seems! The current code works fine with a file path to the fine-tuned transformer model as input (transformer_type), but requires the following: