ternary-weight-embedding
基于xiaobu-embedding-v2[1],在nli-zh[2]和t2ranking[3]数据集文本上微调得到的三元权重text embedding模型。模型中所有Linear层的权重取值为1,0或-1。模型中所有Linear层的权重取值为1,0或-1。推理时间和存储空间可以达到全精度模型的0.37x(在A800上的测试结果)的和0.13x。
使用请安装BITBLAS,支持的GPU见[4]
pip install bitblas
初次运行可能会花一些时间
使用Sentence-Transformers进行测试
pip install -U sentence-transformers
import mteb
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('malenia1/ternary-weight-embedding',trust_remote_code=True)
print(model)
tasks = mteb.get_tasks("OnlineShopping")
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(model, output_folder=f"results")
Reference
- Downloads last month
- 510
Evaluation results
- cosine_pearson on MTEB AFQMC (default)validation set self-reported54.179
- cosine_spearman on MTEB AFQMC (default)validation set self-reported58.250
- euclidean_pearson on MTEB AFQMC (default)validation set self-reported56.121
- euclidean_spearman on MTEB AFQMC (default)validation set self-reported57.559
- main_score on MTEB AFQMC (default)validation set self-reported58.250
- manhattan_pearson on MTEB AFQMC (default)validation set self-reported56.142
- manhattan_spearman on MTEB AFQMC (default)validation set self-reported57.571
- cosine_pearson on MTEB ATEC (default)test set self-reported54.155
- cosine_spearman on MTEB ATEC (default)test set self-reported57.148
- euclidean_pearson on MTEB ATEC (default)test set self-reported60.129