solbi12 commited on
Commit
211591d
·
verified ·
1 Parent(s): 3f5ed1d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +131 -150
README.md CHANGED
@@ -1,199 +1,180 @@
1
  ---
 
 
 
 
 
 
 
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
9
 
 
 
10
 
 
11
 
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
 
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
 
119
- [More Information Needed]
120
 
121
- #### Metrics
 
 
122
 
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
 
124
 
125
- [More Information Needed]
 
126
 
127
- ### Results
128
 
129
- [More Information Needed]
130
 
131
- #### Summary
132
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
 
 
136
 
137
- <!-- Relevant interpretability work for the model goes here -->
 
138
 
139
- [More Information Needed]
 
 
140
 
141
- ## Environmental Impact
 
 
142
 
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
 
 
 
144
 
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
 
 
 
 
146
 
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
 
153
- ## Technical Specifications [optional]
154
 
155
- ### Model Architecture and Objective
 
 
 
 
156
 
157
- [More Information Needed]
158
 
159
- ### Compute Infrastructure
160
 
161
- [More Information Needed]
162
 
163
- #### Hardware
 
 
 
164
 
165
- [More Information Needed]
166
 
167
- #### Software
168
 
169
- [More Information Needed]
170
 
171
- ## Citation [optional]
 
 
 
 
 
 
172
 
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
 
175
- **BibTeX:**
176
 
177
- [More Information Needed]
 
 
 
 
 
 
178
 
179
- **APA:**
180
 
181
- [More Information Needed]
182
 
183
- ## Glossary [optional]
 
 
184
 
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
 
187
- [More Information Needed]
188
 
189
- ## More Information [optional]
 
190
 
191
- [More Information Needed]
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
- ## Model Card Contact
 
 
 
 
 
 
 
198
 
199
- [More Information Needed]
 
 
 
1
  ---
2
+ pipeline_tag: text-classification
3
+ tags:
4
+ - sentiment-analysis
5
+ - text-classification
6
+ - korean
7
+ - ecommerce
8
+ - fashion
9
  library_name: transformers
10
+ license: apache-2.0
11
+ language:
12
+ - ko
13
+ widget:
14
+ - text: "배송이 빠르고 품질도 좋아요"
15
+ - text: "원단이 얇고 마감이 별로네요"
16
+ - text: "가격은 괜찮은데 디자인이 마음에 안 들어요"
17
+ model-index:
18
+ - name: eCommerce Fashion 3-class (KoELECTRA)
19
+ results:
20
+ - task:
21
+ type: text-classification
22
+ name: Sentiment Analysis
23
+ dataset:
24
+ name: Custom Fashion Reviews (ko)
25
+ type: custom
26
+ metrics:
27
+ - name: Accuracy
28
+ type: accuracy
29
+ value: 0.91
30
+ - name: F1 (weighted)
31
+ type: f1
32
+ value: 0.90
33
  ---
34
 
35
+ # 🛍️ eCommerce Fashion 한국어 감정분석 (3-Class)
36
 
37
+ [![Transformers](https://img.shields.io/badge/HF-Transformers-blue?logo=huggingface)](https://huggingface.co/solbi12/ecommers_fasion_fine_tuned_3class_model)
38
+ ![License](https://img.shields.io/badge/License-Apache%202.0-green)
39
+ ![Lang](https://img.shields.io/badge/Language-Korean-orange)
40
+ ![Task](https://img.shields.io/badge/Task-Sentiment%20Analysis-purple)
41
 
42
+ 한국어 **패션 리뷰** 도메인에 특화된 **3-클래스 감정분석 모델**입니다.
43
+ `KoELECTRA-base`를 기반으로 파인튜닝 했으며, 라벨은 **NEGATIVE(0) / NEUTRAL(1) / POSITIVE(2)** 입니다.
44
 
45
+ ---
46
 
47
+ ## 특징
48
+ - 한국어 패션 리뷰(배송/품질/디자인 등)에 최적화
49
+ - 부정/중립/긍정 **3-class 분류**
50
+ - Hugging Face Inference Widget 및 Transformers 라이브러리로 즉시 사용 가능
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ ---
53
 
54
+ ## 🚀 사용법
55
 
56
+ ### 👉 파이프라인
57
+ ```python
58
+ from transformers import pipeline
59
 
60
+ repo_id = "solbi12/ecommers_fasion_fine_tuned_3class_model"
61
+ clf = pipeline("text-classification", model=repo_id, truncation=True)
62
 
63
+ clf("배송이 빠르고 품질도 좋아요")
64
+ # [{'label': 'POSITIVE', 'score': 0.98}]
65
 
66
+ ---
67
 
 
68
 
69
+ ## 📜 README.md (마크다운 형식)
70
 
71
+ ### 💻 모델 사용 방법: PyTorch 직접 사용
72
 
73
+ 이 모델은 한국어 패션 리뷰의 감정을 긍정(POSITIVE), 부정(NEGATIVE), 중립(NEUTRAL) 3가지로 분류하도록 파인튜닝되었습니다. `transformers` 라이브러리를 사용하여 쉽게 로드하고 추론할 수 있습니다.
74
 
75
+ ```python
76
+ import torch
77
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
78
 
79
+ # 모델 ID
80
+ repo_id = "solbi12/ecommers_fasion_fine_tuned_3class_model"
81
 
82
+ # 모델 및 토크나이저 로드 (Hugging Face Hub에서 자동 다운로드)
83
+ tokenizer = AutoTokenizer.from_pretrained(repo_id)
84
+ model = AutoModelForSequenceClassification.from_pretrained(repo_id).eval()
85
 
86
+ # 테스트 텍스트
87
+ text = "원단이 얇고 마감이 별로네요"
88
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
89
 
90
+ # 추론
91
+ with torch.no_grad():
92
+ logits = model(**inputs).logits
93
+ pred = int(logits.argmax(dim=-1))
94
 
95
+ # 라벨 출력
96
+ label_map = {0: "NEGATIVE", 1: "NEUTRAL", 2: "POSITIVE"}
97
+ print(f"입력 텍스트: '{text}'")
98
+ print(f"분류 결과: {label_map[pred]}")
99
+ ```
100
 
101
+ -----
 
 
 
 
102
 
103
+ ### 🏷️ 라벨 정의
104
 
105
+ | 라벨 ID | 라벨명 |
106
+ | :--- | :--- |
107
+ | **0** | **NEGATIVE** (부정) |
108
+ | **1** | **NEUTRAL** (중립) |
109
+ | **2** | **POSITIVE** (긍정) |
110
 
111
+ > `id2label` 및 `label2id`가 모델 설정(`config.json`)에 저장되어 있어 Hugging Face `pipeline` 사용 시에도 라벨명이 자동으로 출력됩니다.
112
 
113
+ -----
114
 
115
+ ### 📊 성능 (Validation Set 기준)
116
 
117
+ | 지표 | 점수 |
118
+ | :--- | :--- |
119
+ | Accuracy | **0.91** |
120
+ | F1-score | **0.90** |
121
 
122
+ > **데이터**: 사내/커스텀 한국어 패션 리뷰 데이터셋
123
 
124
+ -----
125
 
126
+ ### 🏗️ 학습 정보
127
 
128
+ - **Base Model**: `jaehyeong/koelectra-base-v3-generalized-sentiment-analysis`
129
+ - **최대 입력 길이**: 512 토큰
130
+ - **배치 크기**: 32
131
+ - **에포크**: 5
132
+ - **학습률**: 2e-5 (`warmup` 10%)
133
+ - **옵티마이저**: AdamW (`weight decay` 0.01)
134
+ - **손실 함수**: 가중치 부여 교차 엔트로피 (`Weighted CrossEntropy`)
135
 
136
+ -----
137
 
138
+ ### 📦 파일 구성
139
 
140
+ - `config.json` : 모델 구조 및 학습 설정
141
+ - `model.safetensors` : 파인튜닝된 모델 가중치
142
+ - 토크나이저 파일들 :
143
+ - `tokenizer.json`
144
+ - `tokenizer_config.json`
145
+ - `vocab.txt`
146
+ - `special_tokens_map.json`
147
 
148
+ -----
149
 
150
+ ### ⚠️ 한계와 주의 사항
151
 
152
+ - **도메인 특화**: 이 모델은 **패션 리뷰 도메인에 최적화**되어 학습되었습니다. 다른 도메인(예: IT 기기, 영화 리뷰)의 텍스트에 대해서는 성능이 저하될 수 있습니다.
153
+ - **입력 길이 제한**: 입력 텍스트가 512 토큰을 초과할 경우, 초과된 부분은 **자동으로 잘립니다(truncation)**.
154
+ - **컨텍스트 부재**: 이 모델은 텍스트 자체만을 분석하며, 리뷰에 첨부된 상품 이미지, 가격, 사용자 평점 등의 **외부 컨텍스트는 고려하지 않습니다.**
155
 
156
+ -----
157
 
158
+ ### 🔒 라이선스
159
 
160
+ - **라이선스**: Apache-2.0
161
+ - **면책 조항**: 모델 사용 시 **데이터 및 도메인 적합성**은 사용자 본인의 책임입니다.
162
 
163
+ -----
164
 
165
+ ### 🙌 인용 (Citation)
166
 
167
+ 모델을 학술적 또는 상업적 목적으로 사용할 경우, 아래와 같이 인용해 주세요.
168
 
169
+ ```
170
+ @article{lee2025ecommers,
171
+ title={eCommerce Fashion Korean Sentiment (3-Class)},
172
+ author={Lee, Solbi},
173
+ year={2025},
174
+ note={https://huggingface.co/solbi12/ecommers_fasion_fine_tuned_3class_model}
175
+ }
176
+ ```
177
 
178
+ 또는 일반적인 텍스트 형식으로:
179
+ **Solbi Lee, eCommerce Fashion Korean Sentiment (3-Class), 2025.**
180
+ **모델 링크:** [https://huggingface.co/solbi12/ecommers\_fasion\_fine\_tuned\_3class\_model](https://huggingface.co/solbi12/ecommers_fasion_fine_tuned_3class_model)