This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…
Open-weight model · Sentence similarity
text2vec-base-chinese
by Ming Xu (徐明) 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.
Runs On
What it takes to serve text2vec-base-chinese (102M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.2 GB | 0.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.
SAVRN's Notes on text2vec-base-chinese
Five hundred twelve tokens is the number to keep in view. It embeds Chinese sentences into a 768-dimensional vector, trained with CoSENT on hfl/chinese-macbert-base using the shibing624/nli_zh data, so it suits sentence pairs rather than long documents. Its 102 million parameters load in 0.2 GB at 16-bit. The cheapest accelerator in our table, one MI300X with 192 GB at $1.85 per hour on-demand, is beside the point; the ONNX and OpenVINO exports let a CPU node serve it and keep the GPU for the model that answers.
Apache 2.0 allows commercial use, so a Chinese search index is clear once the notices ride along. Anything past 512 tokens must be chunked, and the chunking will matter more than the model choice. Released March 2, 2022 and updated November 14, 2024, with no reported evaluations and no host prices in the SAVRN Index, so test on your own domain.
Model Card
By Ming Xu (徐明), published under apache-2.0, revision 183bb99aa7af.
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:
| Arch | BaseModel | Model | ATEC | BQ | LCQMC | PAWSX | STS-B | SOHU-dd | SOHU-dc | Avg | QPS |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Word2Vec | word2vec | w2v-light-tencent-chinese | 20.00 | 31.49 | 59.46 | 2.57 | 55.78 | 55.04 | 20.70 | 35.03 | 23769 |
| SBERT | xlm-roberta-base | sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 | 18.42 | 38.52 | 63.96 | 10.14 | 78.90 | 63.01 | 52.28 | 46.46 | 3138 |
| Instructor | hfl/chinese-roberta-wwm-ext | moka-ai/m3e-base | 41.27 | 63.81 | 74.87 | 12.20 | 76.96 | 75.83 | 60.55 | 57.93 | 2980 |
| CoSENT | hfl/chinese-macbert-base | shibing624/text2vec-base-chinese | 31.93 | 42.67 | 70.16 | 17.21 | 79.30 | 70.27 | 50.42 | 51.61 | 3008 |
| CoSENT | hfl/chinese-lert-large | GanymedeNil/text2vec-large-chinese | 32.61 | 44.59 | 69.30 | 14.51 | 79.44 | 73.01 | 59.04 | 53.12 | 2092 |
| CoSENT | nghuyong/ernie-3.0-base-zh | shibing624/text2vec-base-chinese-sentence | 43.37 | 61.43 | 73.48 | 38.90 | 78.25 | 70.60 | 53.08 | 59.87 | 3089 |
| CoSENT | nghuyong/ernie-3.0-base-zh | shibing624/text2vec-base-chinese-paraphrase | 44.89 | 63.58 | 74.24 | 40.90 | 78.93 | 76.70 | 63.30 | 63.08 | 3066 |
| CoSENT | sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 | shibing624/text2vec-base-multilingual | 32.39 | 50.33 | 65.64 | 32.56 | 74.45 | 68.88 | 51.17 | 53.67 | 4004 |
Configuration
- Architecture
- BertModel
- Context length (tokens)
- 512
- Layers
- 12
- Hidden size
- 768
- Feed-forward size
- 3,072
- Attention heads
- 12
- Vocabulary size
- 21,128
- Stored precision
- float32
- Model type
- bert
Identity and Version
- Repository
- shibing624/text2vec-base-chinese
- Publisher
- Ming Xu (徐明)
- Task
- Sentence similarity
- Modality
- Text
- Library
- sentence-transformers
- Parameters
- 102M parameters
- Languages
- zh
- Revision
- 183bb99aa7af74355fb58d16edf8c13ae7c5433e
- First published
- 2022-03-02
- Last updated
- 2024-11-14
Files and Weights
22 files, 1.9 GB in total. The weights are 6 files totalling 1.9 GB in bin, onnx, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 409.1 MB | 0c8555154791 |
| onnx/model.onnx | Weights | 407.0 MB | 716d380a65ef |
| onnx/model_O4.onnx | Weights | 203.4 MB | 5db146ea8e6e |
| onnx/model_qint8_avx512_vnni.onnx | Weights | 102.9 MB | 1bff7bee81bc |
| openvino/openvino_model.bin | Weights | 406.7 MB | 89c7ee42c7fa |
| pytorch_model.bin | Weights | 409.2 MB | 54ff3a857e3e |
| 1_Pooling/config.json | Configuration | 74 B | — |
| config.json | Configuration | 856 B | — |
| modules.json | Configuration | 230 B | — |
| onnx/config.json | Configuration | 836 B | — |
| onnx/special_tokens_map.json | Configuration | 125 B | — |
| sentence_bert_config.json | Configuration | 54 B | — |
| special_tokens_map.json | Configuration | 112 B | — |
| README.md | Documentation | 13.7 KB | — |
| logs.txt | Other | 546 B | — |
| openvino/openvino_model.xml | Other | 363.3 KB | — |
| .gitattributes | Repository | 1.2 KB | — |
| onnx/tokenizer.json | Tokenizer | 439.1 KB | — |
| onnx/tokenizer_config.json | Tokenizer | 394 B | — |
| onnx/vocab.txt | Tokenizer | 109.5 KB | — |
| tokenizer_config.json | Tokenizer | 319 B | — |
| vocab.txt | Tokenizer | 109.5 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 1.9 GB
Released by Ming Xu (徐明) through its official repository on Hugging Face. Read the license.
Built From
- Trained on (disclosed) shibing624/nli_zh
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 1.9 GB |
| 16-bit | 0.2 GB |
| 8-bit | 0.1 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Compare text2vec-base-chinese
Questions About text2vec-base-chinese
How much GPU memory does text2vec-base-chinese need?
About 0.2 GB at 16-bit and 0.1 GB at 4-bit: the weights (102M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run text2vec-base-chinese on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use text2vec-base-chinese commercially?
Yes. text2vec-base-chinese is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
What is text2vec-base-chinese's context length?
512 tokens, from the maximum position embeddings in its published configuration.
Similar Models
This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…
This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…
This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. First install the Sentence Transformers library: Then you can load this model and run inference. Approximate statistics based on the first 45 samples: Approximate statistics based on the first 5 samples: - evalstrategy: steps - perdevicetrainbatchsize: 16 - perdeviceevalbatchsize: 16 - learningrate: 3e-06 - maxsteps: 24 - warmupratio: 0.1 - batchsampler: noduplicates - overwriteoutputdir: False - dopredict: False…
This is a PubMedBERT-base model fined-tuned using sentence-transformers. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. The training dataset was generated using a random sample of PubMed title-abstract pairs along with similar title pairs. PubMedBERT Embeddings produces higher quality embeddings than generalized models for medical literature. Further fine-tuning for a medical subdomain will result in even better performance. This model can be used to build embeddings databases with txtai for semantic search and/or as a knowledge source for retrieval augmented generation (RAG). Alternatively, the model can…
Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022 This model has 12 layers and the embedding size is 768. Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Please refer to our paper at https://arxiv.org/pdf/2212.03533.pdf. Check out unilm/e5 to reproduce evaluation results on the BEIR and MTEB benchmark. Below is an example for usage with sentencetransformers. Package requirements pip install sentencetransformers~=2.2.2 1. Do I need to add the prefix "query: " and "passage: " to input texts? Yes, this is how the model is trained, otherwise you will see a performance degradation.…