Role-Playing
Collection
가짜연구소 10기 HuggingFace KREW 프로젝트중 하나인 Hugging Face Hub Garden에서 진행된 프로젝트
•
5 items
•
Updated
EXAGIRL-7.8B-Instruct는 LG AI Research의 EXAONE-3.5-7.8B-Instruct 모델을 기반으로, 한국어 롤플레잉 대화에 특화되도록 미세조정한 LoRA 기반 모델입니다.
우리의 친구 '엑사'는 다양한 페르소나와 상황에 맞춰 자연스럽고 재미있는 대화를 할 수 있도록 만들어졌습니다.
아직 학습이 제대로 되지 않은 pre-release 상태입니다
gf-persona-data
(1 epoch)exa-data
(2 epoch)이 모델은 huggingface-KREW/korean-role-playing에 포함된 다음의 서브셋으로 학습되었습니다:
gf-persona-data
: 연인 간의 페르소나 기반 역할극 대화 데이터셋입니다.exa-data
: 엑사(EXA) 세계관 기반 페르소나를 가진 캐릭터의 감정 표현과 행동 지시 대화가 포함되어 있습니다.from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "huggingface-KREW/EXAGIRL-7.8B-Instruct"
# Tokenizer & Model 불러오기
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto", # 또는 torch.bfloat16
trust_remote_code=True,
device_map="auto"
)
# 대화 프롬프트 구성
messages = [
{"role": "user", "content": "엑사야 뭐하고있니?"}
]
# Chat 템플릿 적용
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
)
# 응답 생성
output = model.generate(
input_ids.to(model.device),
eos_token_id=tokenizer.eos_token_id,
max_new_tokens=128,
do_sample=False
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
본 모델은 EXAONE AI Model License Agreement 1.1 - NC를 따르며, 비상업적 연구 목적으로만 사용이 가능합니다.