From 28f9e4d14ccd29c864a2bb91a3c39d4a2721f398 Mon Sep 17 00:00:00 2001 From: samiabat Date: Mon, 24 Mar 2025 22:30:36 +0300 Subject: [PATCH] add all --- api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index 0d1e1a97..49f70b5c 100644 --- a/api.py +++ b/api.py @@ -998,9 +998,9 @@ else: # 初始化模型 cnhubert.cnhubert_base_path = cnhubert_base_path # tokenizer = AutoTokenizer.from_pretrained(bert_path) -tokenizer = AutoTokenizer.from_pretrained(bert_path) +tokenizer = AutoTokenizer.from_pretrained(bert_path, weights_only=False) -bert_model = AutoModelForMaskedLM.from_pretrained(bert_path) +bert_model = AutoModelForMaskedLM.from_pretrained(bert_path, weights_only=False) ssl_model = cnhubert.get_model() if is_half: bert_model = bert_model.half().to(device)