File size: 6,388 Bytes
54650e6 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 7d68af0 d22e170 7d68af0 54650e6 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 7d68af0 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 d22e170 54650e6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | ---
library_name: transformers
license: apache-2.0
base_model: monologg/koelectra-base-v3-discriminator
tags:
- intent-classification
- korean
- koelectra
- generated_from_trainer
metrics:
- accuracy
- f1
model-index:
- name: koelectra_intent_model
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# koelectra_intent_model
This model is a fine-tuned version of [monologg/koelectra-base-v3-discriminator](https://huggingface.co/monologg/koelectra-base-v3-discriminator) on the custom-intent-dataset dataset.
It achieves the following results on the evaluation set:
- Loss: 0.9360
- Accuracy: 0.9885
- F1: 0.9884
## Model description
# ๐ ๋ชจ๋ธ ์นด๋ (Model Card)
## ๋ชจ๋ธ ์ ๋ณด
### ๊ธฐ๋ณธ ์ ๋ณด
- **๋ชจ๋ธ๋ช
**: Intent Classifier KoELECTRA Fine-tuned
- **๋ชจ๋ธ ID**: `kakao1513/koelectra_intent_model`
- **๊ธฐ๋ณธ ๋ชจ๋ธ**: `monologg/koelectra-base-v3-discriminator`
- **์์
**: ํ
์คํธ ๋ถ๋ฅ (Text Classification)
- **์ธ์ด**: ํ๊ตญ์ด (Korean)
### ๋ชจ๋ธ ๊ฐ์
์ด ๋ชจ๋ธ์ ์ฌ์ฉ์์ ์๋๋ฅผ ๋ถ๋ฅํ๊ธฐ ์ํด KoELECTRA ๋ชจ๋ธ์ ํ๊ตญ์ด ์๋ ๋ถ๋ฅ ๋ฐ์ดํฐ์
์ผ๋ก ๋ฏธ์ธ ์กฐ์ (fine-tuning)ํ ๊ฒ์
๋๋ค. ์ผํ๋ชฐ, ํ์๊ฐ์
, ๋ก๊ทธ์ธ ๋ฑ ์น ์ ํ๋ฆฌ์ผ์ด์
์ ์ฌ์ฉ์ ํ๋ ์๋๋ฅผ 35๊ฐ์ ํด๋์ค๋ก ๋ถ๋ฅํฉ๋๋ค.
---
## ํ๋ จ ๋ฐ์ดํฐ
### ๋ฐ์ดํฐ์
ํต๊ณ
| ํญ๋ชฉ | ๊ฐ |
|------|-----|
| **์ด ๋ฐ์ดํฐ ์** | 7,084 |
| **ํ๋ จ ๋ฐ์ดํฐ** | 5,698 (80%) |
| **ํ
์คํธ ๋ฐ์ดํฐ** | 1,386 (20%) |
| **์๋ ํด๋์ค ์** | 35๊ฐ |
### ์ฃผ์ ์๋ ํด๋์ค (์์)
| ์๋ | ์ค๋ช
| ์ํ ์ |
|------|------|--------|
| `unknown` | ๋ฌด๊ด/์ผ์์ก๋ด | 748 |
| `go_mall` | ์ผํ๋ชฐ๋ก ์ด๋ | 220 |
| `go_coupang` | ์ฟ ํก์ผ๋ก ์ด๋ | 220 |
| `click_login` | ๋ก๊ทธ์ธ | 220 |
| `click_signup` | ํ์๊ฐ์
ํด๋ฆญ | 220 |
| ... | ๊ทธ ์ธ 30๊ฐ ์๋ | - |
---
## ํ๋ จ ์ค์
### ํ์ดํผํ๋ผ๋ฏธํฐ
```python
ํ์ต๋ฅ : 2e-5
๋ฐฐ์น ํฌ๊ธฐ: 32
์ํฌํฌ: 5
์ต๋ ์ํ์ค ๊ธธ์ด: 64
๊ฐ์ค์น ๊ฐ์: 0.01
๋ผ๋ฒจ ์ค๋ฌด๋ฉ: 0.1
์ตํฐ๋ง์ด์ : AdamW
```
### ํ๋ จ ๊ฒฐ๊ณผ
| Epoch | Validation Loss | Accuracy | F1 Score |
|-------|-----------------|----------|----------|
| 1 | 2.651761 | 71.63% | 0.6689 |
| 2 | 1.768677 | 92.35% | 0.9065 |
| 3 | 1.241083 | 97.99% | 0.9797 |
| 4 | 0.999594 | 98.91% | 0.9890 |
| 5 | 0.936003 | 98.85% | 0.9884 |
**์ต์ข
์ฑ๋ฅ (ํ
์คํธ ์
)**
- **์ ํ๋ (Accuracy)**: 98.85%
- **F1 ์ ์ (Weighted)**: 0.9884
---
## ์ฌ์ฉ ๋ฐฉ๋ฒ
### ์ค์น
```bash
pip install transformers torch
```
### ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ
```python
from transformers import pipeline
# ๋ชจ๋ธ ๋ก๋
classifier = pipeline("text-classification",
model="smj1513/intent-classifier-koElectra-finetuned")
# ์์ธก ์คํ
text = "์ผํ๋ชฐ ์ฌ์ดํธ๋ก ์ด๋ ํ ๊น ๋ง๊น ํ ๊ฒ"
result = classifier(text)[0]
print(f"์๋: {result['label']}")
print(f"ํ์ ๋: {result['score']:.4f}")
```
### ์์ธ ์ฌ์ฉ๋ฒ
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# ๋ชจ๋ธ ๋ฐ ํ ํฌ๋์ด์ ๋ก๋
model_name = "smj1513/intent-classifier-koElectra-finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# ํ
์คํธ ์ ์ฒ๋ฆฌ
text = "๋ก๊ทธ์ธ ํ์ด์ง๋ก ๊ฐ์ค"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=64)
# ์์ธก
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class_id = logits.argmax().item()
confidence = torch.softmax(logits, dim=-1)[0][predicted_class_id].item()
print(f"์์ธก ํด๋์ค: {model.config.id2label[predicted_class_id]}")
print(f"์ ๋ขฐ๋: {confidence:.4f}")
```
---
## ์ฑ๋ฅ ๋ถ์
### ๊ฐ์
โ
**๋์ ์ ํ๋**: 98.85%์ ํ
์คํธ ์ ํ๋๋ก ๋งค์ฐ ์ฐ์ํ ์ฑ๋ฅ
โ
**๊ท ํ์กํ F1 ์ ์**: 0.9884์ F1 ์ ์๋ก ์ ๋ฐ๋์ ์ฌํ์จ์ ๊ท ํ ์ ์ง
โ
**๋น ๋ฅธ ์ถ๋ก **: GPU์์ ์ฝ 94๊ฐ/์ด์ ์ฒ๋ฆฌ ์๋
โ
**ํ๊ตญ์ด ํนํ**: KoELECTRA๋ฅผ ์ฌ์ฉํ ํจ์จ์ ์ธ ํ๊ตญ์ด ์ฒ๋ฆฌ
### ์ฃผ์์ฌํญ
โ ๏ธ **๋๋ฉ์ธ ํนํ**: ์ผํ๋ชฐ/ํ์๊ด๋ฆฌ ๋๋ฉ์ธ์ ์ต์ ํ๋์ด ์์
โ ๏ธ **ํ ํฐ ๊ธธ์ด ์ ํ**: ์ต๋ 64 ํ ํฐ์ผ๋ก ์ ํ (๊ธด ๋ฌธ์ฅ์ ํ์ฉ ์ ํ์ )
โ ๏ธ **๋ฏธ์ง ์๋**: `unknown` ํด๋์ค๋ก ๋ถ๋ฅ๋๋ ์ผ์ ์ก๋ด์ด ํฌํจ๋จ
---
## ๊ธฐ์ ์ฌํญ
### ๋ชจ๋ธ ์ํคํ
์ฒ
- **๋ชจ๋ธ ํฌ๊ธฐ**: ELECTRA Base
- **ํ๋ผ๋ฏธํฐ ์**: ~110M
- **์ถ๋ ฅ ๋ ์ด์ด**: ์ ํ ๋ถ๋ฅ ํค๋ (35๊ฐ ํด๋์ค)
### ์
์ถ๋ ฅ ๋ช
์ธ
- **์
๋ ฅ**: ์ต๋ 64 ํ ํฐ ๊ธธ์ด์ ํ๊ตญ์ด ํ
์คํธ
- **์ถ๋ ฅ**: 35๊ฐ ์๋ ํด๋์ค ์ค ํ๋ฅ ์ด ๊ฐ์ฅ ๋์ ํด๋์ค ๋ฐ ์ ๋ขฐ๋
---
## ์ ํ์ฌํญ ๋ฐ ๊ถ์ฅ์ฌํญ
### ์ ์ฉ ๊ฐ๋ฅ ๋๋ฉ์ธ
- โ
์ผํ๋ชฐ/์ ์์๊ฑฐ๋ ์์คํ
- โ
ํ์๊ฐ์
/๋ก๊ทธ์ธ ์๋ ๋ถ๋ฅ
- โ
์น/๋ชจ๋ฐ์ผ ์ ํ๋ฆฌ์ผ์ด์
์ฌ์ฉ์ ๋ช
๋ น
### ๋ถ์ ์ ํ ์ฌ์ฉ ์ฌ๋ก
- โ ์๋ฃ, ๋ฒ๋ฅ ๋ฑ ๊ณ ์ํ ๋๋ฉ์ธ
- โ ์ค์๊ฐ ์์ฑ ์ธ์ (์ด ๋ชจ๋ธ์ ํ
์คํธ ๊ธฐ๋ฐ)
- โ ๋ค๋ฅธ ์ธ์ด ๋๋ ๋๋ฉ์ธ์ ์๋ ๋ถ๋ฅ
### ์ฑ๋ฅ ๊ฐ์ ํ
1. **๋งฅ๋ฝ ์ถ๊ฐ**: ๊ธด ๋ฌธ์ฅ์ ์์ฝํ์ฌ 64ํ ํฐ ์ด๋ด๋ก ์ ์ง
2. **ํ์ฒ๋ฆฌ**: ์ ๋ขฐ๋๊ฐ ๋ฎ์ ๊ฒฝ์ฐ(< 0.7) ์ฌ๋์ ๊ฒํ ๊ถ์ฅ
3. **์ฌํ๋ จ**: ์๋ก์ด ์๋ ํด๋์ค ์ถ๊ฐ ์ ๋ชจ๋ธ ์ฌํ๋ จ
---
## ๋ผ์ด์ ์ค ๋ฐ ์ถ์ฒ
- **๊ธฐ๋ณธ ๋ชจ๋ธ ๋ผ์ด์ ์ค**: MIT (KoELECTRA)
- **๋ชจ๋ธ ๊ณต๊ฐ**: Hugging Face Model Hub
- **์ฌ์ฉ ๋ผ์ด์ ์ค**: MIT
---
## ์ธ์ฉ ์ ๋ณด
์ด ๋ชจ๋ธ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ๋ค์๊ณผ ๊ฐ์ด ์ธ์ฉํด์ฃผ์ธ์:
```bibtex
@misc{intent-classifier-koelectra,
author = {Your Name},
title = {Intent Classifier KoELECTRA Fine-tuned},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/smj1513/intent-classifier-koElectra-finetuned}
}
```
---
## ์ฐ๋ฝ์ฒ ๋ฐ ์ง์
๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ฑฐ๋ ํผ๋๋ฐฑ์ด ์์ผ์๋ฉด Hugging Face ๋ชจ๋ธ ํ์ด์ง์์ Issues๋ฅผ ์ ์ถํด์ฃผ์ธ์.
**๋ง์ง๋ง ์
๋ฐ์ดํธ**: 2026๋
2์ 11์ผ
### Framework versions
- Transformers 5.1.0
- Pytorch 2.9.1+cu128
- Datasets 4.5.0
- Tokenizers 0.22.2
|