bytedance / lightseq

LightSeq: A High Performance Library for Sequence Processing and Generation
Other
3.22k stars 329 forks source link

RuntimeError: Unable to read HDF5 file from lightseq_bert_base_uncased.hdf5 #376

Open hurun opened 2 years ago

hurun commented 2 years ago

系统版本:ubuntu 20.04 lightseq: Version: 2.2.1 python: 3.7.12 torch Version: 1.11.0+cu113

代码复现过程 1、运行python test/ls_bert.py 2、无其他操作。

详细报错结果: initializing bert tokenizer... creating huggingface model... Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForSequenceClassification: ['cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.bias', 'cls.seq_relationship.weight', 'cls.predictions.decoder.weight', 'cls.predictions.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.seq_relationship.bias']

Taka152 commented 2 years ago

You could check the README and export the model first.