Downloads · 30 days
25
20% of all-time downloads
cringepnh/koelectra-korean-shopping-rating
koelectra-korean-shopping-rating is a text classification model from cringepnh. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Four-class classifier for real Korean Naver Shopping ratings 1, 2, 4, and 5. This is not a movie model. Rating 3 is absent from the source dataset, so the model cannot predict it.
Downloads · 30 days
25
20% of all-time downloads
All-time downloads
125
Public
Parameters
113M
452 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors452 MB · 100%
From the Hugging Face model README
Four-class classifier for real Korean Naver Shopping ratings 1, 2, 4, and 5. This is not a movie model. Rating 3 is absent from the source dataset, so the model cannot predict it.
Source code, full reproduction pipeline, and a from-scratch CORAL
ordinal-regression comparison (which this model outperforms — see below):
GitHub.
A Gradio demo lives in that repo's space/ folder and loads this model
straight from the Hub, but there is no hosted demo — Hugging Face requires
a PRO subscription to run Gradio Spaces, so the demo is local-only.
All rows use the same deterministic 19,982-review test split, with 95%
bootstrap confidence intervals. This model is the CE + argmax row —
loadable with stock AutoModelForSequenceClassification, no custom code.
| System | MAE | Exact accuracy | QWK |
|---|---|---|---|
| Constant: training median | 1.5859 | 9.39% | 0.000 |
| Majority rating class | 1.7735 | 40.62% | 0.000 |
| This model (CE + argmax) | 0.3856 [0.376, 0.396] | 71.66% [71.0, 72.3] | 0.837 |
| CE + median decoder (same model, different decode rule) | 0.3858 | 70.88% | 0.842 |
| CORAL ordinal regression (separate model, not published here) | 0.5632 | 56.89% | 0.810 |
The best checkpoint is epoch 2, selected on validation MAE (0.3894). Full per-class breakdown, confusion matrices, the CORAL comparison, and the decoder analysis (argmax vs. expected value vs. median — an earlier version of this project incorrectly assumed expected value minimizes MAE; it minimizes RMSE instead) are in the README.
Known weakness: rating 4 (9.4% of the data) has only 13.5% recall — the model rarely predicts it. This is not hidden by the aggregate MAE.
Source: bab2min/corpus Naver Shopping sentiment
file.
The upstream repository declares the corpus Public Domain.
Pinned source SHA-256:
dc4d1aca0a148671cbe80bcb81962eee297370acab42be93c1617ce9336479c0
The source contains 200,000 real source-file ratings. After excluding all 184 rows associated with 92 identical texts that have conflicting ratings, the splits are 159,852 train / 19,982 validation / 19,982 test. Targets are never derived from sentiment labels or generated synthetically.
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "cringepnh/koelectra-korean-shopping-rating"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id).eval()
inputs = tokenizer("배송도 빠르고 제품도 정말 좋아요", return_tensors="pt", truncation=True)
with torch.inference_mode():
probabilities = torch.softmax(model(**inputs).logits, dim=-1)[0]
index = int(probabilities.argmax())
print(model.config.id2label[index], float(probabilities[index]))