Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,88 @@
|
|
1 |
-
---
|
2 |
-
license: other
|
3 |
-
license_name: exaone
|
4 |
-
license_link: LICENSE
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: exaone
|
4 |
+
license_link: LICENSE
|
5 |
+
datasets:
|
6 |
+
- huggingface-KREW/korean-role-playing
|
7 |
+
language:
|
8 |
+
- ko
|
9 |
+
base_model:
|
10 |
+
- LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct
|
11 |
+
tags:
|
12 |
+
- exaone
|
13 |
+
- role-playing
|
14 |
+
---
|
15 |
+
# EXAGIRL-2.4B-Instruct
|
16 |
+
|
17 |
+
<img src="https://huggingface.co/huggingface-KREW/EXAGIRL-2.4B-Instruct/resolve/main/exagirl-logo.png" alt="EXAGIRL Logo" width="400"/>
|
18 |
+
|
19 |
+
## 👀 모델 소개
|
20 |
+
|
21 |
+
**EXAGIRL-2.4B-Instruct**는 LG AI Research의 [EXAONE-3.5-2.4B-Instruct](https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct) 모델을 기반으로, **한국어 롤플레잉 대화**에 특화되도록 미세조정한 LoRA 기반 모델입니다.
|
22 |
+
우리의 친구 '엑사'는 다양한 페르소나와 상황에 맞춰 자연스럽고 재미있는 대화를 할 수 있도록 만들어졌습니다.
|
23 |
+
|
24 |
+
> 아직 학습이 제대로 되지 않은 pre-release 상태입니다
|
25 |
+
|
26 |
+
## 🧪 학습 정보
|
27 |
+
|
28 |
+
- **Base model**: [LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct](https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct)
|
29 |
+
- **Training strategy**: LoRA (Low-Rank Adaptation)
|
30 |
+
- **learning rate**: 4e-5
|
31 |
+
- **Dataset**:
|
32 |
+
- [`gf-persona-data`](https://huggingface.co/datasets/huggingface-KREW/korean-role-playing) (1 epoch)
|
33 |
+
- [`exa-data`](https://huggingface.co/datasets/huggingface-KREW/korean-role-playing) (2 epoch)
|
34 |
+
- **지원 언어**: 한국어 전용
|
35 |
+
|
36 |
+
## 🗃️ 데이터셋 설명
|
37 |
+
|
38 |
+
이 모델은 [huggingface-KREW/korean-role-playing](https://huggingface.co/datasets/huggingface-KREW/korean-role-playing)에 포함된 다음의 서브셋으로 학습되었습니다:
|
39 |
+
|
40 |
+
- [`gf-persona-data`](https://github.com/Pseudo-Lab/Hugging-Face-Hub-Garden/discussions/31): 연인 간의 페르소나 기반 역할극 대화 데이터셋입니다.
|
41 |
+
- [`exa-data`](https://github.com/Pseudo-Lab/Hugging-Face-Hub-Garden/discussions/30): 엑사(EXA) 세계관 기반 페르소나를 가진 캐릭터의 감정 표현과 행동 지시 대화가 포함되어 있습니다.
|
42 |
+
|
43 |
+
## 🧑💻 사용 예시
|
44 |
+
|
45 |
+
```python
|
46 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
47 |
+
|
48 |
+
model_name = "huggingface-KREW/EXAGIRL-2.4B-Instruct"
|
49 |
+
|
50 |
+
# Tokenizer & Model 불러오기
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
52 |
+
model = AutoModelForCausalLM.from_pretrained(
|
53 |
+
model_name,
|
54 |
+
torch_dtype="auto", # 또는 torch.bfloat16
|
55 |
+
trust_remote_code=True,
|
56 |
+
device_map="auto"
|
57 |
+
)
|
58 |
+
|
59 |
+
# 대화 프롬프트 구성
|
60 |
+
messages = [
|
61 |
+
{"role": "user", "content": "엑사야 뭐하고있니?"}
|
62 |
+
]
|
63 |
+
|
64 |
+
# Chat 템플릿 적용
|
65 |
+
input_ids = tokenizer.apply_chat_template(
|
66 |
+
messages,
|
67 |
+
tokenize=True,
|
68 |
+
add_generation_prompt=True,
|
69 |
+
return_tensors="pt"
|
70 |
+
)
|
71 |
+
|
72 |
+
# 응답 생성
|
73 |
+
output = model.generate(
|
74 |
+
input_ids.to(model.device),
|
75 |
+
eos_token_id=tokenizer.eos_token_id,
|
76 |
+
max_new_tokens=128,
|
77 |
+
do_sample=False
|
78 |
+
)
|
79 |
+
|
80 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
81 |
+
```
|
82 |
+
|
83 |
+
## 📜 라이선스
|
84 |
+
|
85 |
+
본 모델은 [EXAONE AI Model License Agreement 1.1 - NC](https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct/blob/main/LICENSE)를 따르며, **비상업적 연구 목적**으로만 사용이 가능합니다.
|
86 |
+
|
87 |
+
## 🙌 기여자
|
88 |
+
- [@lastdefiance20](https://huggingface.co/lastdefiance20)
|