Downloads · 30 days
55
23% of all-time downloads
Baragi-AI/Munche-v2-768
Munche-v2-768 is a sentence similarity model from Baragi-AI. Use it when you need a score for how close two texts are. It is set up for peft. The card lists the license as gemma.
Munche-v2-768은 한국어 장르소설의 내용보다 문장 운용, 서술 리듬, 형태·기능어 사용과 같은 문체를 비교하기 위해 학습한 768차원 텍스트 임베딩 모델입니다. google/embeddinggemma-300m의 원래 768차원 pooling/projection 경로를 유지하면서, style LoRA를 학습했습니다.
Downloads · 30 days
55
23% of all-time downloads
All-time downloads
235
Public
Repo size
6.5 MB
Likes
1
Public
Click a slice to open those files.
.safetensors6.3 MB · 97%
From the Hugging Face model README
Munche-v2-768은 한국어 장르소설의 내용보다 문장 운용, 서술 리듬, 형태·기능어 사용과 같은 문체를 비교하기 위해 학습한 768차원 텍스트 임베딩 모델입니다. google/embeddinggemma-300m의 원래 768차원 pooling/projection 경로를 유지하면서, style LoRA를 학습했습니다.
이 모델은 일반 의미 검색 모델의 대체재가 아닙니다. 동일·유사한 내용을 찾는 것보다 서로 다른 작품에 반복되는 작가적 문체를 비교하는 용도로 설계했습니다.

q_proj, v_proj, o_proj에 rank 16, alpha 32, dropout 0.05의 LoRA를 학습했습니다. 원본 pooling/projection layer는 동결했습니다.EmbeddingGemma의 문서 prompt를 포함해 입력하는 것을 권장합니다.
import torch
from peft import PeftModel
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("google/embeddinggemma-300m").to(torch.bfloat16)
model[0].auto_model = PeftModel.from_pretrained(
model[0].auto_model,
"Baragi-AI/Munche-v2-768",
)
model.max_seq_length = 1024
texts = [
"title: none | text: 그는 대답하지 않았다. 창밖의 비가 오래된 지붕을 두드렸다.",
"title: none | text: 나는 검을 내려놓았다. 해야 할 말은 이미 모두 끝난 뒤였다.",
]
embeddings = model.encode(
texts,
normalize_embeddings=True,
convert_to_numpy=True,
)
similarity = embeddings @ embeddings.T
한 작품 전체를 임베딩할 때는 다음 절차를 권장합니다.
이 모델은 BF16으로 학습·평가했으며 FP16 activation은 지원하지 않습니다.
text + document prompt
→ frozen EmbeddingGemma 300M backbone
+ trainable Q/V/O LoRA
→ frozen original mean pooling
→ frozen original Dense → Dense (768d)
→ L2 normalization
→ style embedding z ∈ R^768
├─ scalar ordinal publication head [training auxiliary]
├─ Kiwi stylometry MLP [training auxiliary]
└─ Human/AI binary head [training auxiliary]
processed_data와 파생 counterfactual 데이터의 누수를 줄였습니다.8 authors × 3 works × 2 windows입니다. 인간 작품 metric loss는 매 두 번째 step에 적용했습니다.4 authors × 4 works × 3 windows의 prototype 전용 batch를 사용했습니다.N=3 prototype을 support 작품으로 만들고, 제외한 query 작품의 window를 분류합니다.same recipe > same model/different prompt > different model/same prompt > different model/different prompt 순서를 유도하고 후반에는 감쇠합니다.2e-5, auxiliary head LR 8e-5/2e-4, weight decay 0.01, max gradient norm 50; gradient checkpointing은 사용하지 않았습니다.Baragi-AI/Munche-768, Munche-v2-768| Metric | Random | EmbeddingGemma 300M | Munche-768 | Munche-v2-768 |
|---|---|---|---|---|
| Same-work mAP | 0.0221 | 0.5680 | 0.7979 | 0.8233 |
| Same-work Recall@1 | 0.0120 | 0.8328 | 0.9484 | 0.9484 |
| Cross-work author mAP | 0.0882 | 0.1973 | 0.2960 | 0.3433 |
| Cross-work author Recall@1 | 0.0794 | 0.3726 | 0.5302 | 0.6395 |
| Cross-work author MRR | 0.2161 | 0.5163 | 0.6368 | 0.7205 |
| N=3 prototype, 2 support works, macro top1 | 0.0909 | 0.4599 | 0.5064 | 0.6116 |
| N=3 prototype, 3 support works, macro top1 | 0.0909 | 0.4981 | 0.5482 | 0.6205 |
| Content-hard pairwise accuracy | 0.5000 | 0.0888 | 0.5719 | 0.6213 |
| Content-hard top1 | 0.6998 | 0.3726 | 0.7412 | 0.7981 |
Content-hard의 negative는 원본 EmbeddingGemma semantic space에서 가장 가까운 다른 작가 구간입니다. 따라서 EmbeddingGemma 자체의 낮은 content-hard 점수는 일반 의미 검색 성능 저하를 뜻하지 않으며, 같은 semantic space로 고른 의도적인 adversarial baseline입니다. Content-hard top1의 무작위 기댓값이 높은 것은 query당 same-author positive가 다수인 반면 hard negative를 20개로 제한했기 때문입니다.
Munche-768 대비 Munche-v2-768의 cross-work 차이를 작가를 표본 단위로 20,000회 복원추출했습니다.
| Metric | Paired difference | 95% bootstrap CI | Better authors |
|---|---|---|---|
| mAP | +0.0472 | [+0.0107, +0.0850] | 8 / 11 |
| Recall@1 | +0.1093 | [+0.0339, +0.1795] | 9 / 11 |
| MRR | +0.0836 | [+0.0221, +0.1427] | 9 / 11 |
이 모델은 EmbeddingGemma 파생 모델이며 Gemma Terms of Use와 Gemma Prohibited Use Policy를 따릅니다. 베이스 모델 파일을 받으려면 Hugging Face에서 Google의 사용 조건에 동의해야 할 수 있습니다. 자세한 내용은 EmbeddingGemma 모델 카드를 확인하세요.
EmbeddingGemma를 사용하는 경우 원 모델 논문을 인용하세요.
@article{embedding_gemma_2025,
title = {EmbeddingGemma: Powerful and Lightweight Text Representations},
author = {Schechter Vera, Henrique and others},
year = {2025},
url = {https://arxiv.org/abs/2509.20354}
}