Downloads · 30 days
6
13% of all-time downloads
ssgyejin/EXAONE-3.5-7.8B-deobfuscation-KOTOX
EXAONE-3.5-7.8B-deobfuscation-KOTOX is a text generation model from ssgyejin. Use it when you need the model to write or continue text. It is set up for peft.
LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct 를 한국어 텍스트 난독화 복원(deobfuscation) 태스크로 파인튜닝한 LoRA 어댑터입니다. (전체 모델이 아니라 어댑터이므로 베이스 모델에 얹어서 사용합니다.)
Downloads · 30 days
6
13% of all-time downloads
All-time downloads
45
Public
Repo size
151 MB
Likes
0
Public
Click a slice to open those files.
.safetensors151 MB · 93%
From the Hugging Face model README
LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct 를 한국어 텍스트 난독화 복원(deobfuscation) 태스크로 파인튜닝한 LoRA 어댑터입니다. (전체 모델이 아니라 어댑터이므로 베이스 모델에 얹어서 사용합니다.)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct"
adapter = "ssgyejin/EXAONE-3.5-7.8B-deobfuscation-KOTOX"
tokenizer = AutoTokenizer.from_pretrained(adapter, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_model, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter) # LoRA 어댑터 결합
model.eval()
messages = [{"role": "user", "content": "여기에 난독화된 한국어 문장을 입력하세요"}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
out = model.generate(inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
추론 속도가 중요하면 model = model.merge_and_unload() 로 어댑터를 병합해 사용할 수 있습니다.
LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct