Downloads · 30 days
6
7% of all-time downloads
madokalif/qwen2.5-7b-construction-translation-ko-lora
qwen2.5-7b-construction-translation-ko-lora is a text generation model from madokalif. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
건설장비 유지보수 도메인 특화 영한 번역 LoRA 어댑터 (DPO 학습)
Downloads · 30 days
6
7% of all-time downloads
All-time downloads
81
Public
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 93%
From the Hugging Face model README
건설장비 유지보수 도메인 특화 영한 번역 LoRA 어댑터 (DPO 학습)
Note: SFT v2 model is recommended over DPO. DPO training did not improve performance over SFT.
| Model | BLEU | ROUGE-1 | ROUGE-2 | ROUGE-L |
|---|---|---|---|---|
| Qwen Base | 18.42 | 31.15 | 18.47 | 30.38 |
| Qwen SFT v2 | 50.27 | 44.28 | 25.44 | 43.89 |
| Qwen DPO v2 (this) | 49.43 | 43.74 | 25.27 | 43.32 |
| GPT-OSS SFT v2 | 50.68 | 43.18 | 22.79 | 42.56 |
입력: 결함 원인 / 결함 유형 / 현상 / 원인 / 조치 (English)
출력: 결함 원인 / 결함 유형 / 현상 / 원인 / 조치 (Korean)
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, "madokalif/qwen2.5-7b-construction-translation-ko-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
messages = [
{"role": "system", "content": "다음 건설장비 클레임 정보를 한국어로 번역하세요."},
{"role": "user", "content": "결함 원인: Poor material / 현상: LEAK(OIL) in HYDRAULIC/ATTACHMENT..."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3, top_p=0.9, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))