Model reference · open weights

text2vec-chinese-sentence

Available as managed deployment Embeddings shibing624 · community Embeddings 1 variants 579 dl/mo

text2vec-chinese-sentence is an open-weight embedding model from shibing624. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byshibing624
TypeEmbedding models
TaskEmbeddings
Parameters (lead)118M
Context2k tokens
Runs withsentence-transformers
Released2023-06-16
Popularity579 downloads / month
LicenceOpen weights

About

What text2vec-chinese-sentence is

This is a CoSENT(Cosine Sentence) model: shibing624/text2vec-base-chinese-sentence.

It maps sentences to a 768 dimensional dense vector space and can be used for tasks like sentence embeddings, text matching or semantic search.

  • training dataset: https://huggingface.co/datasets/shibing624/nli-zh-all/tree/main/text2vec-base-chinese-sentence-dataset
  • base model: nghuyong/ernie-3.0-base-zh
  • max_seq_length: 256
  • best epoch: 3
  • sentence embedding dim: 768
Read the full model card

Evaluation

For an automated evaluation of this model, see the Evaluation Benchmark: text2vec

Release Models

  • 本项目release模型的中文匹配评测结果:
ArchBaseModelModelATECBQLCQMCPAWSXSTS-BSOHU-ddSOHU-dcAvgQPS
Word2Vecword2vecw2v-light-tencent-chinese20.0031.4959.462.5755.7855.0420.7035.0323769
SBERTxlm-roberta-basesentence-transformers/paraphrase-multilingual-MiniLM-L12-v218.4238.5263.9610.1478.9063.0152.2846.463138
Instructorhfl/chinese-roberta-wwm-extmoka-ai/m3e-base41.2763.8174.8712.2076.9675.8360.5557.932980
CoSENThfl/chinese-macbert-baseshibing624/text2vec-base-chinese31.9342.6770.1617.2179.3070.2750.4251.613008
CoSENThfl/chinese-lert-largeGanymedeNil/text2vec-large-chinese32.6144.5969.3014.5179.4473.0159.0453.122092
CoSENTnghuyong/ernie-3.0-base-zhshibing624/text2vec-base-chinese-sentence43.3761.4373.4838.9078.2570.6053.0859.873089
CoSENTnghuyong/ernie-3.0-base-zhshibing624/text2vec-base-chinese-paraphrase44.8963.5874.2440.9078.9376.7063.3063.083066
CoSENTsentence-transformers/paraphrase-multilingual-MiniLM-L12-v2shibing624/text2vec-base-multilingual32.3950.3365.6432.5674.4568.8851.1753.674004

说明:

  • 结果评测指标:spearman系数
  • shibing624/text2vec-base-chinese模型,是用CoSENT方法训练,基于hfl/chinese-macbert-base在中文STS-B数据训练得到,并在中文STS-B测试集评估达到较好效果,运行examples/training_sup_text_matching_model.py代码可训练模型,模型文件已经上传HF model hub,中文通用语义匹配任务推荐使用
  • shibing624/text2vec-base-chinese-sentence模型,是用CoSENT方法训练,基于nghuyong/ernie-3.0-base-zh用人工挑选后的中文STS数据集shibing624/nli-zh-all/text2vec-base-chinese-sentence-dataset训练得到,并在中文各NLI测试集评估达到较好效果,运行examples/training_sup_text_matching_model_jsonl_data.py代码可训练模型,模型文件已经上传HF model hub,中文s2s(句子vs句子)语义匹配任务推荐使用
  • shibing624/text2vec-base-chinese-paraphrase模型,是用CoSENT方法训练,基于nghuyong/ernie-3.0-base-zh用人工挑选后的中文STS数据集shibing624/nli-zh-all/text2vec-base-chinese-paraphrase-dataset,数据集相对于shibing624/nli-zh-all/text2vec-base-chinese-sentence-dataset加入了s2p(sentence to paraphrase)数据,强化了其长文本的表征能力,并在中文各NLI测试集评估达到SOTA,运行examples/training_sup_text_matching_model_jsonl_data.py代码可训练模型,模型文件已经上传HF model hub,中文s2p(句子vs段落)语义匹配任务推荐使用
  • sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2模型是用SBERT训练,是paraphrase-MiniLM-L12-v2模型的多语言版本,支持中文、英文等
  • w2v-light-tencent-chinese是腾讯词向量的Word2Vec模型,CPU加载使用,适用于中文字面匹配任务和缺少数据的冷启动情况

旧版 shibing624/text2vec-base-chinese-nli 模型放在tag1.0

Usage (text2vec)

Using this model becomes easy when you have text2vec installed:

pip install -U text2vec

Then you can use the model like this:

from text2vec import SentenceModel
sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']

model = SentenceModel('shibing624/text2vec-base-chinese-sentence')
embeddings = model.encode(sentences)
print(embeddings)

Usage (HuggingFace Transformers)

Without text2vec, you can use the model like this:

First, you pass your input through the transformer model, then you have to apply the right pooling

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys text2vec-chinese-sentence for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (text2vec-chinese-sentence below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"text2vec-chinese-sentence","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms