intfloat / SimKGC

ACL 2022, SimKGC: Simple Contrastive Knowledge Graph Completion with Pre-trained Language Models
188 stars 36 forks source link

How to use model file locally instead of linking to Huggingface? How to modify the code? #39

Open PoisonousBromineChan opened 9 months ago

PoisonousBromineChan commented 9 months ago

Hello, due to the server not being able to access the internet and connect to the huggingface, I can only download the model and run it on the server. May I ask how to modify the code when using local model files for training and evaluation? My bert base uncased folder is located in the ./hfl/bert-base-uncased folder. 你好,由于服务器不能翻墙上网,连不上huggingface,我只能下载好模型放到服务器中运行。请问使用本地模型文件进行训练与评估,代码该怎么改?我的bert-base-uncased文件夹放在项目./hfl/bert-base-uncased文件夹中。

yw3l commented 9 months ago

in method 'build_tokenizer' of 'dict_hub.py' file.

PoisonousBromineChan commented 9 months ago

好的,谢谢!另外,我想咨询一下,如果用华东理工大学的医疗数据(数据下载链接http://openkg.cn/dataset/symptom-in-chinese)该怎么修改代码?整个SimKGC项目是否适用于其他数据集? Okay, thank you! Also, I would like to inquire about using medical data from East China University of Science and Technology (data download link) http://openkg.cn/dataset/symptom-in-chinese )How to modify the code? Is the entire SimKGC project applicable to other datasets? image