Model reference · open weights
KR-SBERT-Medium-extended-klueNLItriplet_PARpair_QApair-klueSTS is an open-weight embedding model from snunlp. 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 by | snunlp |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 117M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2024-07-31 |
| Popularity | 1k downloads / month |
| Licence | Unknown |
About
This is a sentence-transformers model trained on the klue/klue dataset. 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.
Model Type: Sentence Transformer
Maximum Sequence Length: 512 tokens
Output Dimensionality: 768 tokens
Similarity Function: Cosine Similarity
Training Dataset:
Language: ko
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, '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("snunlp/KR-SBERT-Medium-extended-klueNLItriplet_PARpair_QApair-klueSTS")
# Run inference
sentences = [
'SR은 동대구·김천구미·신경주역에서 승하차하는 모든 국민에게 운임 10%를 할인해 준다.',
'SR은 동대구역, 김천구미역, 신주역을 오가는 모든 승객을 대상으로 요금을 10% 할인해 드립니다.',
'수강신청 하는 날짜가 어느 날짜인지 아시는지요?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
sts-dev| Metric | Value |
|---|---|
| pearson_cosine | 0.8786 |
| spearman_cosine | 0.8765 |
| pearson_manhattan | 0.8589 |
| spearman_manhattan | 0.8582 |
| pearson_euclidean | 0.8595 |
| spearman_euclidean | 0.8597 |
| pearson_dot | 0.8518 |
| spearman_dot | 0.8479 |
| pearson_max | 0.8786 |
| spearman_max | 0.8765 |
| sentence1 | sentence2 | label | |
|---|---|---|---|
| type | string | string | float |
| details | min: 7 tokensmean: 18.12 tokensmax: 56 tokens | min: 6 tokensmean: 17.58 tokensmax: 60 tokens | min: 0.0mean: 0.44max: 1.0 |
| sentence1 | sentence2 | label |
|---|---|---|
| 숙소 위치는 찾기 쉽고 일반적인 한국의 반지하 숙소입니다. | 숙박시설의 위치는 쉽게 찾을 수 있고 한국의 대표적인 반지하 숙박시설입니다. | 0.7428571428571428 |
| 위반행위 조사 등을 거부·방해·기피한 자는 500만원 이하 과태료 부과 대상이다. | 시민들 스스로 자발적인 예방 노력을 한 것은 아산 뿐만이 아니었다. | 0.0 |
| 회사가 보낸 메일은 이 지메일이 아니라 다른 지메일 계정으로 전달해줘. | 사람들이 주로 네이버 메일을 쓰는 이유를 알려줘 | 0.06666666666666667 |
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
From the published model card. Full card on the HuggingFace links in the sidebar.
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.879 |
| Semantic Similarity | sts dev | Spearman Cosine | 0.877 |
| Semantic Similarity | sts dev | Pearson Manhattan | 0.859 |
| Semantic Similarity | sts dev | Spearman Manhattan | 0.858 |
| Semantic Similarity | sts dev | Pearson Euclidean | 0.860 |
| Semantic Similarity | sts dev | Spearman Euclidean | 0.860 |
| Semantic Similarity | sts dev | Pearson Dot | 0.852 |
| Semantic Similarity | sts dev | Spearman Dot | 0.848 |
| Semantic Similarity | sts dev | Pearson Max | 0.879 |
| Semantic Similarity | sts dev | Spearman Max | 0.877 |
Using it via the API
Once AxForge deploys kr-sbert-medium-extended-kluenlitriplet-parpair-qapair-kluests for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (kr-sbert-medium-extended-kluenlitriplet-parpair-qapair-kluests 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":"kr-sbert-medium-extended-kluenlitriplet-parpair-qapair-kluests","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.