solbi12/ecommers_fasion_fine_tuned_3class_model
๐๏ธ eCommerce Fashion ํ๊ตญ์ด ๊ฐ์ ๋ถ์ (3-Class)

ํ๊ตญ์ด ํจ์
๋ฆฌ๋ทฐ ๋๋ฉ์ธ์ ํนํ๋ 3-ํด๋์ค ๊ฐ์ ๋ถ์ ๋ชจ๋ธ์
๋๋ค. KoELECTRA-base๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ์ธํ๋ ํ์ผ๋ฉฐ, ๋ผ๋ฒจ์ NEGATIVE(0) / NEUTRAL(1) / POSITIVE(2) ์
๋๋ค.
โจ ํน์ง
- ํ๊ตญ์ด ํจ์ ๋ฆฌ๋ทฐ(๋ฐฐ์ก/ํ์ง/๋์์ธ ๋ฑ)์ ์ต์ ํ
- ๋ถ์ /์ค๋ฆฝ/๊ธ์ 3-class ๋ถ๋ฅ
- Hugging Face Inference Widget ๋ฐ Transformers ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก ์ฆ์ ์ฌ์ฉ ๊ฐ๋ฅ
๐ ์ฌ์ฉ๋ฒ
๐ ํ์ดํ๋ผ์ธ
from transformers import pipeline
repo_id = "solbi12/ecommers_fasion_fine_tuned_3class_model"
clf = pipeline("text-classification", model=repo_id, truncation=True)
clf("๋ฐฐ์ก์ด ๋น ๋ฅด๊ณ ํ์ง๋ ์ข์์")
# [{'label': 'POSITIVE', 'score': 0.98}]
---
## ๐ README.md (๋งํฌ๋ค์ด ํ์)
### ๐ป ๋ชจ๋ธ ์ฌ์ฉ ๋ฐฉ๋ฒ: PyTorch ์ง์ ์ฌ์ฉ
์ด ๋ชจ๋ธ์ ํ๊ตญ์ด ํจ์
๋ฆฌ๋ทฐ์ ๊ฐ์ ์ ๊ธ์ (POSITIVE), ๋ถ์ (NEGATIVE), ์ค๋ฆฝ(NEUTRAL) 3๊ฐ์ง๋ก ๋ถ๋ฅํ๋๋ก ํ์ธํ๋๋์์ต๋๋ค. `transformers` ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ ์ฝ๊ฒ ๋ก๋ํ๊ณ ์ถ๋ก ํ ์ ์์ต๋๋ค.
import torch from transformers import AutoTokenizer, AutoModelForSequenceClassification
๋ชจ๋ธ ID
repoid = "solbi12/ecommersfasionfinetuned3classmodel"
๋ชจ๋ธ ๋ฐ ํ ํฌ๋์ด์ ๋ก๋ (Hugging Face Hub์์ ์๋ ๋ค์ด๋ก๋)
tokenizer = AutoTokenizer.frompretrained(repoid) model = AutoModelForSequenceClassification.frompretrained(repoid).eval()
ํ ์คํธ ํ ์คํธ
text = "์๋จ์ด ์๊ณ ๋ง๊ฐ์ด ๋ณ๋ก๋ค์" inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
์ถ๋ก
with torch.no_grad(): logits = model(**inputs).logits pred = int(logits.argmax(dim=-1))
๋ผ๋ฒจ ์ถ๋ ฅ
labelmap = {0: "NEGATIVE", 1: "NEUTRAL", 2: "POSITIVE"} print(f"์ ๋ ฅ ํ ์คํธ: '{text}'") print(f"๋ถ๋ฅ ๊ฒฐ๊ณผ: {labelmap[pred]}")
-----
### ๐ท๏ธ ๋ผ๋ฒจ ์ ์
| ๋ผ๋ฒจ ID | ๋ผ๋ฒจ๋ช
|
| :--- | :--- |
| **0** | **NEGATIVE** (๋ถ์ ) |
| **1** | **NEUTRAL** (์ค๋ฆฝ) |
| **2** | **POSITIVE** (๊ธ์ ) |
> `id2label` ๋ฐ `label2id`๊ฐ ๋ชจ๋ธ ์ค์ (`config.json`)์ ์ ์ฅ๋์ด ์์ด Hugging Face `pipeline` ์ฌ์ฉ ์์๋ ๋ผ๋ฒจ๋ช
์ด ์๋์ผ๋ก ์ถ๋ ฅ๋ฉ๋๋ค.
-----
### ๐ ์ฑ๋ฅ (Validation Set ๊ธฐ์ค)
| ์งํ | ์ ์ |
| :--- | :--- |
| Accuracy | **0.91** |
| F1-score | **0.90** |
> **๋ฐ์ดํฐ**: "[AI HUB ๋ฐ์ดํฐ์
](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&searchKeyword=%EC%86%8D%EC%84%B1%EA%B8%B0%EB%B0%98%20%EA%B0%90%EC%A0%95%EB%B6%84%EC%84%9D%20%EB%8D%B0%EC%9D%B4%ED%84%B0&aihubDataSe=data&dataSetSn=71603)"
-----
### ๐๏ธ ํ์ต ์ ๋ณด
- **Base Model**: `jaehyeong/koelectra-base-v3-generalized-sentiment-analysis`
- **์ต๋ ์
๋ ฅ ๊ธธ์ด**: 512 ํ ํฐ
- **๋ฐฐ์น ํฌ๊ธฐ**: 32
- **์ํฌํฌ**: 5
- **ํ์ต๋ฅ **: 2e-5 (`warmup` 10%)
- **์ตํฐ๋ง์ด์ **: AdamW (`weight decay` 0.01)
- **์์ค ํจ์**: ๊ฐ์ค์น ๋ถ์ฌ ๊ต์ฐจ ์ํธ๋กํผ (`Weighted CrossEntropy`)
-----
### ๐ฆ ํ์ผ ๊ตฌ์ฑ
- `config.json` : ๋ชจ๋ธ ๊ตฌ์กฐ ๋ฐ ํ์ต ์ค์
- `model.safetensors` : ํ์ธํ๋๋ ๋ชจ๋ธ ๊ฐ์ค์น
- ํ ํฌ๋์ด์ ํ์ผ๋ค :
- `tokenizer.json`
- `tokenizer_config.json`
- `vocab.txt`
- `special_tokens_map.json`
-----
### โ ๏ธ ํ๊ณ์ ์ฃผ์ ์ฌํญ
- **๋๋ฉ์ธ ํนํ**: ์ด ๋ชจ๋ธ์ **ํจ์
๋ฆฌ๋ทฐ ๋๋ฉ์ธ์ ์ต์ ํ**๋์ด ํ์ต๋์์ต๋๋ค. ๋ค๋ฅธ ๋๋ฉ์ธ(์: IT ๊ธฐ๊ธฐ, ์ํ ๋ฆฌ๋ทฐ)์ ํ
์คํธ์ ๋ํด์๋ ์ฑ๋ฅ์ด ์ ํ๋ ์ ์์ต๋๋ค.
- **์
๋ ฅ ๊ธธ์ด ์ ํ**: ์
๋ ฅ ํ
์คํธ๊ฐ 512 ํ ํฐ์ ์ด๊ณผํ ๊ฒฝ์ฐ, ์ด๊ณผ๋ ๋ถ๋ถ์ **์๋์ผ๋ก ์๋ฆฝ๋๋ค(truncation)**.
- **์ปจํ
์คํธ ๋ถ์ฌ**: ์ด ๋ชจ๋ธ์ ํ
์คํธ ์์ฒด๋ง์ ๋ถ์ํ๋ฉฐ, ๋ฆฌ๋ทฐ์ ์ฒจ๋ถ๋ ์ํ ์ด๋ฏธ์ง, ๊ฐ๊ฒฉ, ์ฌ์ฉ์ ํ์ ๋ฑ์ **์ธ๋ถ ์ปจํ
์คํธ๋ ๊ณ ๋ คํ์ง ์์ต๋๋ค.**
-----
### ๐ ๋ผ์ด์ ์ค
- **๋ผ์ด์ ์ค**: Apache-2.0
- **๋ฉด์ฑ
์กฐํญ**: ๋ชจ๋ธ ์ฌ์ฉ ์ **๋ฐ์ดํฐ ๋ฐ ๋๋ฉ์ธ ์ ํฉ์ฑ**์ ์ฌ์ฉ์ ๋ณธ์ธ์ ์ฑ
์์
๋๋ค.
-----
### ๐ ์ธ์ฉ (Citation)
๋ณธ ๋ชจ๋ธ์ ํ์ ์ ๋๋ ์์
์ ๋ชฉ์ ์ผ๋ก ์ฌ์ฉํ ๊ฒฝ์ฐ, ์๋์ ๊ฐ์ด ์ธ์ฉํด ์ฃผ์ธ์.
@article{lee2025ecommers, title={eCommerce Fashion Korean Sentiment (3-Class)}, author={Lee, Solbi}, year={2025}, note={https://huggingface.co/solbi12/ecommersfasionfinetuned3class_model} }
๋๋ ์ผ๋ฐ์ ์ธ ํ
์คํธ ํ์์ผ๋ก:
**Solbi Lee, eCommerce Fashion Korean Sentiment (3-Class), 2025.**
**๋ชจ๋ธ ๋งํฌ:** [https://huggingface.co/solbi12/ecommers\_fasion\_fine\_tuned\_3class\_model](https://huggingface.co/solbi12/ecommers_fasion_fine_tuned_3class_model)