Open songjuhan opened 1 year ago
AttributeError Traceback (most recent call last) in 17 device = torch.device("cuda:0") 18 #BERT 모델, Vocabulary 불러오기 ---> 19 bertmodel, vocab = get_pytorch_kobert_model()
~/juhan/kobert/kobert/KoBERT/kobert/pytorch_kobert.py in get_pytorch_kobert_model(ctx, cachedir) 50 # download vocab 51 vocab_path = get_tokenizer() ---> 52 return get_kobert_model(model_path, vocab_path, ctx) 53 54
~/juhan/kobert/kobert/KoBERT/kobert/pytorch_kobert.py in get_kobert_model(model_path, vocab_file, ctx) 29 bertmodel.to(device) 30 bertmodel.eval() ---> 31 vocab_b_obj = nlp.vocab.BERTVocab.from_sentencepiece( 32 vocab_file, padding_token="[PAD]" 이 오류에 대해 혹시 알수 있을까요?
gluonnlp을 0.6.0으로 사용하셨다면 해당 오류가 발생할 수 있습니다. from_sentencepiece는 gluonnlp==0.7.0부터 지원되는 듯해요.
gluonnlp
0.6.0
from_sentencepiece
gluonnlp==0.7.0
using cached model. /home/cgac/juhan/kobert/kobert/KoBERT/.cache/kobert_v1.zip using cached model. /home/cgac/juhan/kobert/kobert/KoBERT/.cache/kobert_news_wiki_ko_cased-1087f8699e.spiece
AttributeError Traceback (most recent call last) in 17 device = torch.device("cuda:0") 18 #BERT 모델, Vocabulary 불러오기 ---> 19 bertmodel, vocab = get_pytorch_kobert_model()
~/juhan/kobert/kobert/KoBERT/kobert/pytorch_kobert.py in get_pytorch_kobert_model(ctx, cachedir) 50 # download vocab 51 vocab_path = get_tokenizer() ---> 52 return get_kobert_model(model_path, vocab_path, ctx) 53 54
~/juhan/kobert/kobert/KoBERT/kobert/pytorch_kobert.py in get_kobert_model(model_path, vocab_file, ctx) 29 bertmodel.to(device) 30 bertmodel.eval() ---> 31 vocab_b_obj = nlp.vocab.BERTVocab.from_sentencepiece( 32 vocab_file, padding_token="[PAD]" 이 오류에 대해 혹시 알수 있을까요?