bert_score icon indicating copy to clipboard operation
bert_score copied to clipboard

Using Clinical Models as Model_Type in BertScore

Open behnazeslami opened this issue 1 year ago • 0 comments
trafficstars

Hi, I am going to use the clinical models like "BSC-LT/roberta-base-biomedical-clinical-es", "Clinical BioBERT", or even one of the clinical models in this link "https://huggingface.co/models?search=clinical" as a model_type in bert score but I get the following error:

P, R, F1 = score(cands, refs, lang="en", model_type="BSC-LT/roberta-base-biomedical-clinical-es", verbose=True)

KeyError Traceback (most recent call last) in <cell line: 1>() ----> 1 P, R, F1 = score(cands, refs, lang="en", model_type="BSC-LT/roberta-base-biomedical-clinical-es", verbose=True /usr/local/lib/python3.10/dist-packages/bert_score/score.py in score(cands, refs, model_type, num_layers, verbose, idf, device, batch_size, nthreads, all_layers, lang, return_hash, rescale_with_baseline, baseline_path, use_fast_tokenizer) 93 model_type = lang2model[lang] 94 if num_layers is None: ---> 95 num_layers = model2layers[model_type] 96 97 tokenizer = get_tokenizer(model_type, use_fast_tokenizer) KeyError: 'BSC-LT/roberta-base-biomedical-clinical-es

Could you please assist me how I can solve this issue? Thanks

behnazeslami avatar May 06 '24 22:05 behnazeslami