You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

EXAONE-3.5 ์ •๋ถ€ ์ •์ฑ… ์œ„๋ฐ˜ ๋ถ„๋ฅ˜๊ธฐ v1

์ •๋ถ€ ์ •์ฑ… ๊ด€๋ จ ์งˆ๋ฌธ์˜ ์œ„๋ฐ˜ ์œ ํ˜•์„ ๋ถ„๋ฅ˜ํ•˜๋Š” EXAONE 3.5 7.8B ๊ธฐ๋ฐ˜ ๋ถ„๋ฅ˜ ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.

๋ชจ๋ธ ๊ฐœ์š”

  • ๋ฒ ์ด์Šค ๋ชจ๋ธ: LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct
  • ์ž‘์—…: Multi-class Text Classification (6๊ฐœ ์นดํ…Œ๊ณ ๋ฆฌ)
  • ์–ธ์–ด: Korean (ํ•œ๊ตญ์–ด)
  • ๋ฒ„์ „: v1
  • ํŒŒ์ธํŠœ๋‹ ๋ฐฉ๋ฒ•: QLoRA (4-bit quantization)
  • Training Data: 40000 samples
  • Validation Data: 10000 samples

๋ชจ๋ธ ์„ค๋ช…

์ด ๋ชจ๋ธ์€ ์ •๋ถ€ ์ •์ฑ… ๊ด€๋ จ ์งˆ๋ฌธ์„ ๋‹ค์Œ 6๊ฐœ ์นดํ…Œ๊ณ ๋ฆฌ๋กœ ๋ถ„๋ฅ˜ํ•ฉ๋‹ˆ๋‹ค:

  1. SAFE: ๊ณต๊ฐœ๋œ ์ •๋ณด์— ๋Œ€ํ•œ ์•ˆ์ „ํ•œ ์งˆ๋ฌธ
  2. VIOLATION_PRIVACY_CITIZEN: ์‹œ๋ฏผ์˜ ๊ฐœ์ธ์ •๋ณด/์‚ฌ์ƒํ™œ ์นจํ•ด
  3. VIOLATION_CLASSIFIED: ๊ตญ๊ฐ€ ๊ธฐ๋ฐ€/๋ถ„๋ฅ˜๋œ ์ •๋ณด ์š”์ฒญ
  4. VIOLATION_HR: ๊ณต๋ฌด์› ์ธ์‚ฌ ์ •๋ณด ์š”์ฒญ
  5. VIOLATION_SALARY: ๊ณต๋ฌด์› ๊ธ‰์—ฌ/์—ฐ๋ด‰ ์ •๋ณด ์š”์ฒญ
  6. VIOLATION_DELIBERATION: ์ •๋ถ€ ๋‚ด๋ถ€ ์‹ฌ์˜/์˜์‚ฌ๊ฒฐ์ • ๊ณผ์ • ์š”์ฒญ

LG AI Research์—์„œ ๊ฐœ๋ฐœํ•œ EXAONE 3.5 7.8B ๋ชจ๋ธ์„ ๊ธฐ๋ฐ˜์œผ๋กœ QLoRA ํŒŒ์ธํŠœ๋‹์„ ํ†ตํ•ด ๊ฐœ๋ฐœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉ ๋ฐฉ๋ฒ•

from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch

# 4-bit ์–‘์žํ™” ์„ค์ •
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_use_double_quant=True,
)

# ๋ฒ ์ด์Šค ๋ชจ๋ธ ๋กœ๋“œ
base_model = AutoModelForCausalLM.from_pretrained(
    "LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct",
    quantization_config=bnb_config,
    device_map="auto",
    trust_remote_code=True
)

# LoRA ์–ด๋Œ‘ํ„ฐ ๋กœ๋“œ
model = PeftModel.from_pretrained(base_model, "psh3333/EXAONE-Policy-Violation-Detector-v1")
tokenizer = AutoTokenizer.from_pretrained("psh3333/EXAONE-Policy-Violation-Detector-v1")

# ์ถ”๋ก 
text = "๊ตญ๋ฏผ์˜ ์ธํ„ฐ๋„ท ์‚ฌ์šฉ ๊ธฐ๋ก์„ ์ •๋ถ€๊ฐ€ ์ถ”์ ํ•˜๊ณ  ์žˆ๋‚˜์š”?"
system_msg = """๋‹น์‹ ์€ ์ •๋ถ€ ์ •์ฑ… ๊ด€๋ จ ์งˆ๋ฌธ์˜ ์œ„๋ฐ˜ ์œ ํ˜•์„ ๋ถ„๋ฅ˜ํ•˜๋Š” ์ „๋ฌธ ์‹œ์Šคํ…œ์ž…๋‹ˆ๋‹ค.

๋‹ค์Œ ์นดํ…Œ๊ณ ๋ฆฌ ์ค‘ ํ•˜๋‚˜๋กœ ๋ถ„๋ฅ˜ํ•˜์„ธ์š”:
- SAFE: ๊ณต๊ฐœ๋œ ์ •๋ณด์— ๋Œ€ํ•œ ์•ˆ์ „ํ•œ ์งˆ๋ฌธ
- VIOLATION_PRIVACY_CITIZEN: ์‹œ๋ฏผ์˜ ๊ฐœ์ธ์ •๋ณด/์‚ฌ์ƒํ™œ ์นจํ•ด
- VIOLATION_CLASSIFIED: ๊ตญ๊ฐ€ ๊ธฐ๋ฐ€/๋ถ„๋ฅ˜๋œ ์ •๋ณด ์š”์ฒญ
- VIOLATION_HR: ๊ณต๋ฌด์› ์ธ์‚ฌ ์ •๋ณด ์š”์ฒญ
- VIOLATION_SALARY: ๊ณต๋ฌด์› ๊ธ‰์—ฌ/์—ฐ๋ด‰ ์ •๋ณด ์š”์ฒญ
- VIOLATION_DELIBERATION: ์ •๋ถ€ ๋‚ด๋ถ€ ์‹ฌ์˜/์˜์‚ฌ๊ฒฐ์ • ๊ณผ์ • ์š”์ฒญ"""

messages = [
    {"role": "system", "content": system_msg},
    {"role": "user", "content": f"๋‹ค์Œ ์งˆ๋ฌธ์„ ๋ถ„๋ฅ˜ํ•˜์„ธ์š”:\n\n{text}"}
]

inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=50, temperature=0.1)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
# ์ถœ๋ ฅ ์˜ˆ์‹œ: "VIOLATION_PRIVACY_CITIZEN"

ํ•™์Šต ์„ธ๋ถ€์‚ฌํ•ญ

  • ํŒŒ์ธํŠœ๋‹ ๋ฐฉ๋ฒ•: QLoRA (4-bit quantization)
  • LoRA Rank: 64
  • Learning Rate: 0.0002
  • Epochs: 3
  • Batch Size: 32 (effective)

๋ผ์ด์„ ์Šค

Apache 2.0 License


์ด ๋ชจ๋ธ์€ ์—ฐ๊ตฌ ๋ฐ ๊ต์œก ๋ชฉ์ ์œผ๋กœ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for psh3333/EXAONE-Policy-Violation-Detector-v1

Finetuned
(17)
this model