thunlp / PL-Marker

Source code for "Packed Levitated Marker for Entity and Relation Extraction"
MIT License
260 stars 35 forks source link

Import pretrained models error #42

Closed OStars closed 1 year ago

OStars commented 1 year ago

你好,我按照 conll03 脚本的设置运行 run_ner.py,并将 model_name_or_path 设置为 roberta-base(roberta-large 也设置过),但是在下载模型时出错,如下图所示。 另外,我也尝试将模型下载存放到 bert_models/roberta-base 中(包括 pytorch_model.bin, config.json, vocab.json, merge.txt),此时运行 run_ner.py 提示该文件夹下缺少文件(added_tokens.json, special_tokens_map.json, tokenizer_config.json),然而这些文件在 huggingface 的模型仓库中无法找到 image

YeDeming commented 1 year ago
mkdir -p bert_models/roberta-large
wget -P bert_models/roberta-large https://huggingface.co/roberta-large/resolve/main/pytorch_model.bin
wget -P bert_models/roberta-large https://huggingface.co/roberta-large/resolve/main/merges.txt
wget -P bert_models/roberta-large https://huggingface.co/roberta-large/resolve/main/vocab.json
wget -P bert_models/roberta-large https://huggingface.co/roberta-large/resolve/main/config.json

然后把model_name_or_path设置为bert_models/roberta-large