I want to modify some huggingface models to do some experiments. How should I import my modified transformers package in colab?
What I want to do is to change the model code to output some internal values, but I still want to use the huggingface transformers’ flows. Or is there any other way I can do this?
I cloned the huggingface transformers repository to my own github repository:
https://github.com/tianhua2/my_huggingface
Then in colab, I did:
!pip install git+https://github.com/tianhua2/my_huggingface
This command runs fine.
Then I did
import my_huggingface
from my_huggingface import BigBirdForMaskedLM, BigBirdTokenizerFast
it shows error
ImportError: cannot import name ‘BigBirdForMaskedLM’ from ‘my_huggingface’ (unknown location)