Downloads · 30 days
40
56% of all-time downloads
ggh5454/open-provence-koen-legal
open-provence-koen-legal is a machine learning model from ggh5454. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
OpenProvence 기반의 한국 법률 문서 Semantic Highlighting 모델입니다. 쿼리와 문서가 주어졌을 때, 문서 내 관련 span을 식별하여 불필요한 텍스트를 제거(pruning)합니다.
Downloads · 30 days
40
56% of all-time downloads
All-time downloads
72
Public
Parameters
568M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
OpenProvence 기반의 한국 법률 문서 Semantic Highlighting 모델입니다.
쿼리와 문서가 주어졌을 때, 문서 내 관련 span을 식별하여 불필요한 텍스트를 제거(pruning)합니다.
| 항목 | 내용 |
|---|---|
| Base Model | BAAI/bge-reranker-v2-m3 |
| Architecture | OpenProvenceForSequenceClassification (XLM-RoBERTa 기반) |
| Task | Reranking + Text Pruning (Semantic Highlighting) |
| Language | Korean (주), English |
| Domain | 법률 (판례, 판결문, 법령) |
| Max Length | 512 tokens |
| 하이퍼파라미터 | 값 |
|---|---|
| Learning Rate | 2e-5 |
| Epochs | 3 |
| Batch Size | 1 (grad_accum=64, effective=64) |
| Warmup Ratio | 0.1 |
| Weight Decay | 0.01 |
| Precision | bf16 |
| Teacher | BAAI/bge-reranker-v2-m3 (score distillation) |
훈련 데이터: ggh5454/legal-provence-ko-with-relevance (train split, 50,000 examples)
Teacher score distillation을 통해 reranker의 relevance 점수를 span 단위로 전파하여 학습.
| Metric | Value |
|---|---|
| F2 Score | 0.7433 |
| Recall | 0.9145 |
| Precision | 0.4250 |
| Mean Compression | 89.91% |
| Span Accuracy | 0.9629 |
평균 89.91% 텍스트 압축률로 관련 span의 91.45% 회수
| Dataset | F2 Score | Recall | Compression |
|---|---|---|---|
| MS-MARCO | 0.7665 | 1.0000 | 2.38% |
| Natural Questions | 0.3762 | 1.0000 | 25.95% |
| GooAQ | 0.7027 | 1.0000 | 12.57% |
from transformers import AutoConfig, AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("ggh5454/open-provence-koen-legal", trust_remote_code=True)
model = AutoModel.from_pretrained("ggh5454/open-provence-koen-legal", trust_remote_code=True)
query = "부가가치세 면세 대상은?"
document = "부가가치세법 제26조에 따라 다음 재화 또는 용역의 공급에 대해서는 부가가치세를 면제한다..."
inputs = tokenizer(query, document, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
# outputs: reranking score + span pruning labels
OpenProvence 원 논문을 기반으로 한국 법률 도메인에 fine-tuning한 모델입니다.
@misc{open-provence-koen-legal,
author = {ggh5454},
title = {open-provence-koen-legal},
year = {2026},
publisher = {HuggingFace},
}