Closed Holy-Shine closed 3 years ago
Hi @Holy-Shine Try:
from transformers import TFAutoModel
model = TFAutoModel.from_pretrained("hfl/chinese-bert-wwm-ext")
@vishal-burman thanks! It works for me. And I found that my tf_model.h5 file in my local dir definitely too "thin" that model loader cannot figure out it.
python version: 3.7.6 transformers: 4.6.1 tensorflow-cpu: 2.3.1
my code:
and
chinese-bert-wwm-ext
is a model dir that is downloaded from https://huggingface.co/models。 After I run this code in my jupyter notebook, I get an OSError: