KorDef-LLM
Korean Defense Domain Instruction-Tuned Language Model
KorDef-LLM is a 12B-parameter language model fine-tuned from google/gemma-3-12b-it on a domain-specific instruction corpus drawn from publicly available, unclassified Korean defense administrative-rule (행정규칙) and educational PDFs.
This model accompanies the manuscript "An Open Pipeline for Domain-Adaptive Instruction Tuning of Korean Defense Large Language Models" (submitted to PeerJ Computer Science). It is released for research and educational use only, with the limitations and out-of-scope uses described below.
Released Artifacts
Model Description
- Base model:
google/gemma-3-12b-it (Gemma-3, 12B parameters, instruction-tuned)
- Fine-tuning: Supervised instruction tuning (full SFT, FSDP distributed; not LoRA)
- Domain: Korean defense administrative rules, doctrine documents, and educational materials (all publicly available, unclassified)
- Training corpus: Combined prompt-generated and document-grounded instruction–response pairs; the prompt-generated subset (235,367 pairs) is publicly released via Zenodo
- Training steps: 7,875
Intended Use
KorDef-LLM is intended for:
- Research on Korean professional-domain language modeling and domain adaptation
- Educational reference-style question answering over Korean defense administrative-rule documents
- Comparison studies and reproducibility evaluations in Korean NLP
- A base model for further research-oriented fine-tuning in related Korean professional domains
The model is NOT intended for:
- Autonomous decision-making in military operations, procurement, maintenance, targeting, or any safety-critical procedure
- Generation of classified, sensitive, or operationally restricted content
- Deployment in real-world high-stakes settings without institutional review, retrieval grounding, and human expert oversight
- Any use that violates applicable laws, regulations, or the Gemma Terms of Use
Evaluation Summary
KorDef-LLM was evaluated on two complementary benchmarks; full details are reported in the accompanying paper.
KMMLU (general Korean reasoning, 5-shot)
| Model | KMMLU (%) |
|---|
| A.X-4.0-Light | 55.7 |
| KorDef-LLM (ours) | 48.0 |
| Gemma-3-12B (base) | 46.0 |
| Qwen-2.5-7B-Instruct | 45.8 |
| EXAONE-3.5-7.8B-Instruct | 45.3 |
| Llama-3.1-8B-Instruct | 41.6 |
KorDef-LLM ranks second among six compared models on KMMLU, exceeding the base model and three additional open Korean/multilingual baselines, indicating that domain-adaptive instruction tuning preserves general Korean reasoning ability.
Source-Grounded Evaluation (N=323, public defense PDFs)
Paired comparison against the base Gemma-3-12B under identical context, prompt, and decoding conditions:
| Metric | Gemma-3-12B | KorDef-LLM | Δ | p (Wilcoxon) |
|---|
| Token-F1 | 0.398 | 0.428 | +0.030 | < 1e-7 |
| ROUGE-L | 0.380 | 0.402 | +0.022 | < 1e-3 |
| Character 3-gram Jaccard | 0.258 | 0.281 | +0.023 | < 1e-4 |
| Evidence-token recall | 0.534 | 0.549 | +0.015 | 0.108 (n.s.) |
| Mean answer tokens | 45.2 | 41.2 | −4.0 | < 1e-11 |
Statistically significant improvements over the base model in three content-overlap metrics, with no significant change in evidence recall or refusal rate.
In a cross-model comparison against five baselines (Gemma-3-12B, EXAONE-3.5-7.8B, Qwen-2.5-7B, Llama-3.1-8B, A.X-4.0-Light) on the same evaluation set, KorDef-LLM achieves the highest mean evidence-token recall, the metric most directly tied to source faithfulness in source-grounded QA. The train/eval overlap audit confirms zero exact question, zero exact answer, and zero near-question (Jaccard ≥ 0.80) overlap between the training corpus and the evaluation set.
Known Limitations
-
Effect sizes are modest. The improvements over the base model on a source-grounded evaluation are statistically significant but small in absolute magnitude (~3 percentage points on Token-F1). The model is not a substitute for retrieval-augmented generation or human expert review.
-
Evidence recall and refusal rate are not significantly improved. While source-grounded inference shows favorable trends on these source-faithfulness metrics, none reach statistical significance against the base model. Source faithfulness in the deployed system should be enforced via retrieval grounding and explicit citation requirements.
-
The training corpus is partially released. Only the prompt-generated subset of the training corpus is publicly available via Zenodo. The full released corpus, source manifest, segments, and evaluation set are available; the model weights are released here.
-
No human expert evaluation. Evaluation was conducted using automatic metrics. Future deployments in any operational or educational context should be validated by qualified Korean defense doctrine experts.
-
Defense-domain language specificity. The model is tuned for Korean defense administrative-rule and educational text style. It may produce overly formal or excessively verbose responses outside this domain.
-
Hallucination risk. Like all large language models, KorDef-LLM may generate plausible-sounding but factually incorrect content, especially when asked about topics not covered by its training corpus or when source context is incomplete.
Safety Considerations
-
Dual-use awareness: Defense-domain language modeling carries inherent dual-use considerations. The released model and corpus contain only publicly available administrative-rule and educational content, not operational, tactical, or classified information.
-
Recommended deployment pattern: For any real-world use, we recommend retrieval-augmented generation with explicit source citation, deployment within controlled (e.g., air-gapped) infrastructure, and human expert review of outputs in any consequential workflow.
-
Memorization and data extraction: The model has been trained on Korean defense administrative-rule text. While the training data is unclassified, users should still exercise caution regarding prompts that attempt to extract training data verbatim.
-
Prompt injection: As with all instruction-tuned LLMs, the model may be vulnerable to prompt-injection attacks in deployed agentic settings. Defensive measures (input sanitization, instruction layering, output filtering) are recommended.
How to Use
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "graphuser/kordef-12b"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="bfloat16",
8 device_map={"": 0}, # single GPU; avoids CPU offload
9)
10
11# Source-grounded prompting (recommended pattern)
12prompt = """다음 [출처]를 참고하여 [질문]에 정확히 답변하시오.
13
14[출처]
15(여기에 관련 행정규칙 또는 문서 발췌 삽입)
16
17[질문]
18(여기에 질문 작성)
19
20[답변]"""
21
22inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
23outputs = model.generate(
24 **inputs,
25 max_new_tokens=192,
26 do_sample=False,
27 repetition_penalty=1.05,
28)
29print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Citation
If you use this model, please cite the paper and the dataset:
1@article{gwak2026kordef,
2 title = {An Open Pipeline for Domain-Adaptive Instruction Tuning of Korean Defense Large Language Models},
3 author = {Gwak, Sang-Hwan and Choi, Ji-Young and Jeong, Chang-Hoo and Lee, Gunwoo and Kim, Ina and Lee, Kyung-Ha},
4 journal = {PeerJ Computer Science (submitted)},
5 year = {2026}
6}
7
8@dataset{kordef_corpus_2026,
9 title = {KorDef-LLM: Korean Defense Domain Instruction Corpus and Source-Grounded Evaluation Set},
10 author = {Gwak, Sang-Hwan and others},
11 year = {2026},
12 publisher = {Zenodo},
13 doi = {10.5281/zenodo.20083055}
14}
License
- Model weights: Gemma Terms of Use (the model is fine-tuned from
google/gemma-3-12b-it). Users must comply with the Gemma Terms.
- Released corpus (Zenodo): CC-BY-4.0
- Code (GitHub): MIT
Acknowledgments
This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT and DAPA) (No. RS-2024-00452972).
Contact
For questions about this model or the accompanying paper, please contact the corresponding author at
kyongha@kisti.re.kr or open an issue on the
GitHub repository.