bert_score icon indicating copy to clipboard operation
bert_score copied to clipboard

load local models for bert-score.

Open WangYangfan opened this issue 8 months ago • 0 comments

load local models for bert-score.

just change model_type to your local model path, e.g.

self.bert_scorer = BERTScorer(
    model_type="/Users/wangyangfan/remote/models/FacebookAI/roberta-large",
    device='mps', 
    rescale_with_baseline=True, 
    lang='en'
)

👏 Inspired by @shuaijiumei, thanks a lot!

WangYangfan avatar Jun 14 '24 16:06 WangYangfan