Skip to content

Commit a0c11ae

Browse files
authored
Merge pull request #33 from codefuse-ai/modelcache_dev_mm
fix issue: model params not used in code
2 parents e13a801 + f0f5d79 commit a0c11ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modelcache/embedding/data2vec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def mean_pooling(model_output, attention_mask):
1414

1515

1616
class Data2VecAudio(BaseEmbedding):
17-
def __init__(self, model: str = "sentence-transformers/all-MiniLM-L6-v2"):
17+
def __init__(self, model: str = "model/text2vec-base-chinese/"):
1818
current_dir = os.path.dirname(os.path.abspath(__file__))
1919
parent_dir = os.path.dirname(current_dir)
2020
model_dir = os.path.dirname(parent_dir)
21-
model = os.path.join(model_dir, 'model/text2vec-base-chinese/')
21+
model = os.path.join(model_dir, model)
2222

2323
try:
2424
self.__dimension = self.model.config.hidden_size

0 commit comments

Comments
 (0)