Instructions to use yangpapa/Munche-768 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yangpapa/Munche-768 with PEFT:
Task type is invalid.
- sentence-transformers
How to use yangpapa/Munche-768 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yangpapa/Munche-768") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Munche-768
A 768-dimensional embedding model for Korean fiction style.
Munche-768 by Baragi AI represents stylistic similarity between Korean fiction passages. It was trained to reduce reliance on names and shared plot content while preserving signals such as sentence rhythm, dialogue balance, paragraph structure, punctuation, and narrative phrasing.
Munche-768 is a rank-32 LoRA adapter for google/embeddinggemma-300m. The base model, pooling module, and dense projections remain frozen.
Explore the interactive evaluation and 3D embedding space →
Related model: Munche-768-AI-Detector applies Munche-768 to Korean genre-fiction dataset triage.
Results
All Korean test sets are separated from training by work and verified author group.
The chart compares the four primary held-out Korean fiction evaluations. Higher scores are better.
| Evaluation | Base EmbeddingGemma | Munche-768 |
|---|---|---|
| Same-work retrieval mAP@R | 56.7% | 84.0% |
| Same-author cross-work retrieval mAP@R | 59.6% | 79.9% |
| Content-hard accuracy | 22.6% | 83.1% |
| Counterfactual ordering accuracy | 0.0% | 79.5% |
Additional test results
| Evaluation | Result | Test size |
|---|---|---|
| Same-work retrieval Hit@1 | 95.6% | 1,089 queries |
| Same-author cross-work retrieval Hit@1 | 88.2% | 348 queries |
| Pseudonym-query retrieval mAP@R | 81.1% | 1,089 queries |
| Strong-format retrieval mAP@R | 68.3% | 1,089 queries |
| PAN21 cross-fandom authorship AUROC | 89.5% | 19,999 pairs |
Same-work retrieval searches for non-overlapping passages from the same work within a same-genre gallery. Same-author cross-work retrieval searches for another work by the same author. Content-hard accuracy requires the correct passage to outrank four content-similar passages from other works. Counterfactual ordering accuracy requires another human passage from the same work to outrank an LLM rewrite that preserves the source content.
Usage
Access to the gated EmbeddingGemma base model is required.
pip install torch sentence-transformers peft
from peft import PeftModel
from sentence_transformers import SentenceTransformer
base = SentenceTransformer("google/embeddinggemma-300m")
base[0].auto_model = PeftModel.from_pretrained(
base[0].auto_model,
"Baragi-AI/Munche-768",
)
base.max_seq_length = 2048
texts = [
"첫 번째 한국어 소설 본문",
"두 번째 한국어 소설 본문",
]
embeddings = base.encode(
texts,
normalize_embeddings=True,
convert_to_numpy=True,
)
similarity = embeddings @ embeddings.T
print(embeddings.shape) # (2, 768)
Cosine similarity can be calculated with a dot product when the normalized embeddings returned above are used.
Model details
| Property | Value |
|---|---|
| Base model | google/embeddinggemma-300m |
| Output dimension | 768 |
| Maximum input length | 2,048 tokens |
| Adapter | LoRA rank 32, alpha 64, dropout 0.05 |
| Target modules | Attention q/k/v/o and MLP gate/up/down projections |
| Trainable parameters | 8,355,840 |
| Pooling and projection | Original EmbeddingGemma modules, frozen |
| Output normalization | L2 normalization |
Training data
The private Korean corpus contains fiction passages with work and verified author-group labels. Raw text, titles, author identities, and source paths are not distributed.
The Korean training relations include:
- 64,000 positive pairs from the same work or verified works by the same author;
- 24,000 content-similar passages from different works;
- 1,306 pairs of human passages and content-preserving LLM rewrites;
- original, pseudonym-replaced, and proper-noun-masked Korean inputs.
The model also uses cross-fandom authorship relations reconstructed from PAN fanfiction data and feature-disjoint style relations from SynthSTEL. Korean and English examples are optimized in separate contrastive batches.
Intended use
Munche-768 is designed for:
- retrieving Korean fiction passages with similar writing style;
- comparing style across works by the same or different authors;
- clustering and auditing fiction corpora;
- comparing style distributions from human writers and language models;
- providing style-similarity signals for research and data curation.
Limitations
- Evaluation focuses on Korean genre fiction. Performance on poetry, essays, news, translated fiction, and short conversational text has not been established.
- Paragraph boundaries and punctuation remain meaningful signals. Normalizing them reduced same-work retrieval mAP@R from 84.0% to 68.3%.
- Genre, publication period, narrative viewpoint, and dialogue ratio may remain entangled with style.
- Same-author evaluation uses a limited number of verified multi-work author groups.
- SynthSTEL feature-disjoint accuracy was 1.9%. The model should not be presented as a general multilingual style encoder.
- AI and human separation results apply only to the evaluated rewrite procedures and should not be treated as a general AI detector.
- The model is not suitable as sole evidence for forensic or legal authorship attribution.
AI and human rewrite diagnostic
A logistic regression probe trained on Munche-768 embeddings achieved an AUROC of 0.967 and balanced accuracy of 91.3% on 190 work-disjoint human and LLM rewrite pairs. Human recall was 95.8%, and LLM rewrite recall was 86.8%. This diagnostic measures linear separation within the evaluated content-preserving rewrite distribution.
License
Munche-768 is a derivative adapter of EmbeddingGemma and is distributed under the Gemma Terms of Use. Use of the base model requires accepting its access conditions on Hugging Face.
The private Korean training corpus and its source text are not included in this repository.
Citation
@software{munche768,
title = {Munche-768: Korean Fiction Style Embedding Model},
author = {Baragi AI},
year = {2026},
url = {https://huggingface.co/Baragi-AI/Munche-768}
}
- Downloads last month
- -
Model tree for yangpapa/Munche-768
Base model
google/embeddinggemma-300m