Model reference · open weights
ko-legal-sbert-finetuned is an open-weight embedding model from woong0322. 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 | woong0322 |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 111M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2025-06-21 |
| Popularity | 3k downloads / month |
| Licence | Unknown |
About
language: ko license: apache-2.0 library_name: sentence-transformers pipeline_tag: sentence-similarity tags:
Ko-Legal-SBERT는 한국 법률 문서에 특화된 문장 임베딩 모델입니다. 35,104개의 고품질 법률 트리플셋으로 파인튜닝되어 법률 문서 간의 의미적 유사도를 정확하게 측정할 수 있습니다.
import requests
API_URL = "https://api-inference.huggingface.co/models/woong0322/ko-legal-sbert-finetuned"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
# 임베딩 생성
output = query({
"inputs": "인터넷 사기 피해 손해배상 청구"
})
from sentence_transformers import SentenceTransformer
import numpy as np
# 모델 로드
model = SentenceTransformer('woong0322/ko-legal-sbert-finetuned')
# 법률 텍스트 임베딩
texts = [
"상여금을 임금으로 인정하기 위한 요건",
"퇴직금 산정의 기초가 되는 평균임금",
"형법상 절도의 범의와 고의"
]
embeddings = model.encode(texts)
# 유사도 계산
similarity_01 = np.dot(embeddings[0], embeddings[1]) # 노동법 관련: 높은 유사도
similarity_02 = np.dot(embeddings[0], embeddings[2]) # 노동법 vs 형법: 낮은 유사도
print(f"노동법 문서 간 유사도: {similarity_01:.3f}") # 예상: 0.85+
print(f"노동법 vs 형법 유사도: {similarity_02:.3f}") # 예상: 0.0 근처
| 메트릭 | 점수 | 설명 |
|---|---|---|
| 동일 분야 유사도 | 0.853 | 같은 법 분야 문서 간 평균 유사도 |
| 분야 간 구분도 | 0.023 | 다른 법 분야 간 평균 유사도 (낮을수록 좋음) |
| 전체 품질 점수 | 95.0/100 | 데이터 품질 종합 평가 |
이 모델은 SentenceTransformers 라이브러리를 사용하여 학습되었으며, 다음과 같은 구조를 가집니다:
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})
)
이 모델을 연구나 상업적 목적으로 사용하실 때는 다음과 같이 인용해주세요:
@misc{ko-legal-sbert-2025,
title={Ko-Legal-SBERT: Korean Legal Domain Specialized Sentence Embedding Model},
author={woong0322},
year={2025},
url={https://huggingface.co/woong0322/ko-legal-sbert-finetuned}
}
이 모델은 Apache 2.0 라이선스 하에 배포됩니다. 상업적 사용이 가능하며, 출처만 명시하면 자유롭게 사용하실 수 있습니다.
💡 이 모델이 도움이 되셨다면 ⭐을 눌러주세요!
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys ko-legal-sbert-finetuned for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (ko-legal-sbert-finetuned 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":"ko-legal-sbert-finetuned","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.