Model reference · open weights
text2vec-chinese is an open-weight embedding model from shibing624, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
shibing624/text2vec-base-chinese This is a CoSENT(Cosine Sentence) model: shibing624/text2vec-base-chinese. It maps sentences to a 768 dimensional dense vector space and can be used for tasks like sentence embeddings, text matching or semantic search. Evaluation For an automated evaluation of this model, see the Evaluation Benchmark: text2vec - chinese text matching task: 说明: - 结果评测指标:spearman系数 - shibing624/text2vec-base-chinese模型,是用CoSENT方法训练,基于hfl/chinese-macbert-base在中文STS-B数据训练得到,并在中文STS-B测试集评估达到较好效果,运行examples/trainingsuptextmatchingmodel.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/trainingsuptextmatchingmodeljsonldata.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/trainingsuptextmatchingmodeljsonldata.py代码可训练模型,模型文件已经上传HF model hub,中文s2p(句子vs段落)语义匹配任务推荐使用 - sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2模型是用SBERT训练,是paraphrase-MiniLM-L12-v2模型的多语言版本,支持中文、英文等 - w2v-light-tencent-chinese是腾讯词向量的Word2Vec模型,CPU加载使用,适用于中文字面匹配任务和缺少数据的冷启动情况 Usage (text2vec) Using this model becomes easy when you have text2vec installed: Then you can use the model like this: 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-operation on-top of the contextualized word embeddings. Install transformers: Then load model and predict: Usage (sentence-transformers) sentence-transformers is a popular library to compute dense vector representations for sentences. Install sentence-transformers: Then load model and predict: Model speed up In short: 1. ✅ shibing624/text2vec-base-chinese (onnx-O4), ONNX Optimized to O4 does not reduce performan
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | shibing624 |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 102M |
| Context | 512 tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Released | 2022-03-02 |
| Popularity | 1.1M downloads / month |
| Likes | 801 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| text2vec-base-chinese | 102M | BF16 | ~0.2 GB | ✓ | Weights ↗ |
Using it via the API
Once AxForge deploys text2vec-chinese for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (text2vec-chinese 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","input":"text to embed"}'
Details
Languages
Trained / evaluated on
Tags
Licence
Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗
Explore