Downloads · 30 days
7
4% of all-time downloads
EunB2/A.X-4.0-Kolegal-textconverter
A.X-4.0-Kolegal-textconverter is a text generation model from EunB2. Use it when you need the model to write or continue text. It is set up for peft.
A.X-4.0-Kolegal-textconverter is a Korean legal style refinement model that rewrites Korean legal texts into clearer, more natural sentences.
Downloads · 30 days
7
4% of all-time downloads
All-time downloads
196
Public
Repo size
842 MB
Likes
0
Public
Click a slice to open those files.
.safetensors842 MB · 99%
From the Hugging Face model README
A.X-4.0-Kolegal-textconverter is a Korean legal style refinement model that rewrites Korean legal texts into clearer, more natural sentences.
It was trained on parallel data of original Korean Civil Code articles and their refined counterparts, and was developed for research on how the complexity of legal style affects language model performance on Korean legal NLP tasks.
Rewrites the archaic, ungrammatical, and hard-to-parse style of Korean statutory text into grammatically correct, standard modern Korean — preserving the legal meaning.
| 민법 제29조제2항 | |
|---|---|
| Input | 실종자의 생존한 사실 또는 전조의 규정과 상이한 때에 사망한 사실의 증명이 있으면 법원은 본인, 이해관계인 또는 검사의 청구에 의하여 실종선고를 취소하여야 한다. 그러나 실종선고후 그 취소전에 선의로 한 행위의 효력에 영향을 미치지 아니한다. |
| Output | 실종자가 생존한 사실 또는 제28조의 규정과 서로 다른 때에 사망한 사실의 증명이 있으면 법원은 본인, 이해관계인 또는 검사의 청구에 따라 실종선고를 취소하여야 한다. 그러나 실종선고 후 그 취소 전에 선의로 한 행위의 효력에 영향을 미치지 않는다. |
Load the base model together with the LoRA adapter:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "skt/A.X-4.0"
adapter_model = "EunB2/A.X-4.0-Kolegal-textconverter"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_model)
model.eval()
prompt = (
"제시된 법률 텍스트의 원문을 문법적으로 올바르고, 이해하기 쉽게 수정하라.\n"
"원문: 민사에 관하여 법률에 규정이 없으면 관습법에 의하고 관습법이 없으면 조리에 의한다."
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Eunbi Cho. "The Impact of Korean Legal Style Refinement on Legal Natural Language Processing by Language Models." Master's thesis, Korea University, Seoul, 2026. (in Korean)