silk-road's picture
Upload folder using huggingface_hub
1704217 verified
raw
history blame contribute delete
313 Bytes
from transformers import AutoModel, AutoTokenizer
def initEmbedding(model_name="BAAI/bge-small-zh-v1.5", **model_wargs):
return AutoModel.from_pretrained(model_name, **model_wargs)
def initTokenizer(model_name="BAAI/bge-small-zh-v1.5", **model_wargs):
return AutoTokenizer.from_pretrained(model_name)