Downloads · 30 days
6
10% of all-time downloads
YEOPHYEONG/qwen2.5-bdi-lora
qwen2.5-bdi-lora is a text generation model from YEOPHYEONG. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
이 모델은 Qwen/Qwen2.5-3B-Instruct를 기반으로, 한국어 보이스피싱 문장을 대상으로 BDI(Belief, Desire, Intention) 추론을 수행할 수 있도록 LoRA 방식으로 파인튜닝된 모델입니다. 발화자의 신념(Belief), 욕구(Desire), 의도(Intention)를 윤리성 점수로 분석해 종합 BDI 점수를 계산합니다.
Downloads · 30 days
6
10% of all-time downloads
All-time downloads
61
Public
Parameters
3.1B
12.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors12.6 GB · 98%
From the Hugging Face model README
YEOPHYEONG/qwen2.5-bdi-lora이 모델은 Qwen/Qwen2.5-3B-Instruct를 기반으로, 한국어 보이스피싱 문장을 대상으로 BDI(Belief, Desire, Intention) 추론을 수행할 수 있도록 LoRA 방식으로 파인튜닝된 모델입니다.
발화자의 신념(Belief), 욕구(Desire), 의도(Intention)를 윤리성 점수로 분석해 종합 BDI 점수를 계산합니다.
모델은 OpenAI API로 생성된 BDI 기준 데이터를 기반으로 하며, 허위/조작된 발화에 대해 민감하게 반응하도록 설계되었습니다. 그러나 다음의 제한점이 존재합니다:
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, TextStreamer
from peft import PeftModel
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16
)
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-3B-Instruct",
trust_remote_code=True,
quantization_config=bnb_config,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "YEOPHYEONG/qwen2.5-bdi-lora").eval()
tokenizer = AutoTokenizer.from_pretrained("YEOPHYEONG/qwen2.5-bdi-lora", trust_remote_code=True)
prompt = """다음 문장을 BDI 이론에 따라 점수로 분석하라:
문장: "지금 피해자 분의 계좌를 동결처리해야될 거 같아요. 동의 하시죠?"
답변:"""
streamer = TextStreamer(tokenizer)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
model.generate(**inputs, max_new_tokens=400, do_sample=False, streamer=streamer)
BDI 점수는 발화자의 의도와 윤리성에 따라 다음 기준으로 평가됩니다:
0~3점 (사기 / 협박 / 조작)
4~6점 (혼란 / 중립 / 애매함)
7~10점 (도움 / 정직 / 피해 호소)
@misc{qwen2024,
title={Qwen 2.5: A Stronger Multilingual Instruction-tuned Language Model},
author={Alibaba Cloud},
howpublished = {\url{https://huggingface.co/Qwen/Qwen2.5-3B-Instruct}},
year={2024}
}