Model reference · open weights
bert-large-cantonese-sts is an open-weight embedding model from hon9kon9ize. bert-large-cantonese-sts (FP32) weighs 652 MB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the hon9kon9ize/bert-large-cantonese-sts model card, 2026-10-01
What it is
| Released by | hon9kon9ize |
|---|---|
| Released | 2024-08-20 |
| Parameters | 326M |
| VRAM | 652 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
This is a sentence-transformers model finetuned from hon9kon9ize/bert-large-cantonese-nli on the yue-stsb, stsb and C-MTEB/STSB dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'一個細路女同一個細路仔喺度睇書。',
'一個大啲嘅小朋友玩緊公仔,望住窗外。',
'有個男人彈緊結他。',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
sts-dev and sts-test| Metric | sts-dev | sts-test |
|---|---|---|
| pearson_cosine | 0.7983 | 0.7638 |
| spearman_cosine | 0.7996 | 0.7605 |
Size: 5,749 training samples
Columns: sentence1, sentence2, and score
Approximate statistics based on the first 1000 samples:
| sentence1 | sentence2 | score | |
|---|---|---|---|
| type | string | string | float |
| details | min: 7 tokensmean: 12.24 tokensmax: 40 tokens | min: 7 tokensmean: 12.21 tokensmax: 30 tokens | min: 0.0mean: 0.45max: 1.0 |
Samples:
| sentence1 | sentence2 | score |
|---|---|---|
| 架飛機正準備起飛。 | 一架飛機正準備起飛。 | 1.0 |
| 有個男人吹緊一支好大嘅笛。 | 有個男人吹緊笛。 | 0.76 |
| 有個男人喺批薩上面灑碎芝士。 | 有個男人將磨碎嘅芝士灑落一塊未焗嘅批薩上面。 | 0.76 |
Loss: CosineSimilarityLoss with these parameters:
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
Size: 16,729 training samples
Columns: sentence1, sentence2, and score
Approximate statistics based on the first 1000 samples:
| sentence1 | sentence2 | score | |
|---|---|---|---|
| type | string | string | float |
| details | min: 5 tokensmean: 20.29 tokensmax: 74 tokens | min: 6 tokensmean: 20.36 tokensmax: 76 tokens | min: 0.0mean: 0.52max: 1.0 |
Samples:
| sentence1 | sentence2 | score |
|---|
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Semantic Similarity | sts dev | Pearson Cosine | 0.798 |
| Semantic Similarity | sts dev | Spearman Cosine | 0.800 |
| Semantic Similarity | sts test | Pearson Cosine | 0.764 |
| Semantic Similarity | sts test | Spearman Cosine | 0.760 |