Instructions to use rudalson/klue-bert-classification-petitions with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rudalson/klue-bert-classification-petitions with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="rudalson/klue-bert-classification-petitions")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("rudalson/klue-bert-classification-petitions") model = AutoModelForSequenceClassification.from_pretrained("rudalson/klue-bert-classification-petitions") - Notebooks
- Google Colab
- Kaggle
KLUE_BERT Classification - Fine-tuned on Korean-Petitions
KLUE-BERT ๋ชจ๋ธ(klue/bert-base)์ ํ๊ตญ ์ฒญ์๋ ๊ตญ๋ฏผ์ฒญ์ ๋ฐ์ดํฐ์
(heegyu/korean-petitions)์ผ๋ก Fine-tuningํ์ฌ ์ฒญ์ ๋ด์ฉ์ ์๋์ผ๋ก ์นดํ
๊ณ ๋ฆฌ ๋ณ๋ก ๋ถ๋ฅํฉ๋๋ค.
๋ฐ์ดํฐ ๋ถํฌ ์๊ฐํ
Model Details
Model Description
- Task: Multi-class Text Classification (17 Categories)
- Base Model: klue/bert-base
- Technique: PEFT / LoRA (Rank=32, Alpha=64)
- Language: Korean
- Description: ์ฒญ์๋ ๊ตญ๋ฏผ์ฒญ์์ ์ ๋ชฉ๊ณผ ๋ณธ๋ฌธ์ ์ ๋ ฅ๋ฐ์ ํด๋น ์ฒญ์์ด ์ด๋ ์นดํ ๊ณ ๋ฆฌ(์: ์ ์น๊ฐํ, ๋ณด๊ฑด๋ณต์ง, ์ธ๊ถ/์ฑํ๋ฑ ๋ฑ)์ ์ํ๋์ง ์์ธกํฉ๋๋ค.
Model Uses
Direct Use
ํ๊ตญ์ด ํ
์คํธ๋ก ๋ ๋ฏผ์์ด๋ ์ ์์ ํน์ ์นดํ
๊ณ ๋ฆฌ๋ก ๋ถ๋ฅํ๋ ๋ฐ ์ง์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ํนํ ๊ณต๊ณต ๊ธฐ๊ด์ ๋ฏผ์ ์๋ ๋ถ๋ฅ ์์คํ
์ด์์ผ๋ก ํ์ฉํ๊ธฐ์ ์ ํฉํฉ๋๋ค:
์ ์น๊ฐํ, ์ธ๊ต/ํต์ผ/๊ตญ๋ฐฉ, ์ผ์๋ฆฌ, ๋ฏธ๋, ์ฑ์ฅ๋๋ ฅ, ๋์ฐ์ด์ด, ๋ณด๊ฑด๋ณต์ง, ๋ง์๊ณต๋์ฒด, ๊ฒฝ์ ๋ฏผ์ฃผํ, ์์ /ํ๊ฒฝ, ์ฃผ๊ฑฐ/20๋, ์ธ๊ถ/์ฑํ๋ฑ, ๋ฌธํ/์์ /์ฒด์ก/์ธ๋ก , ๋ฐ๋ ค๋๋ฌผ, ๊ตํต/๊ฑด์ถ/๊ตญํ , ํ์ , ๊ธฐํ
Downstream Use
์ ๋ถ ์ ์ฑ ์ ๋ํ ์ฌ๋ก ๋ถ์, ํน์ ์๊ธฐ๋ณ ์ฌํ์ ์ด์ ํธ๋ ๋ ํ์ ๋ฑ ๋ฐ์ดํฐ ๋ถ์ ํ๋ก์ ํธ์ ๊ธฐ์ด ๋ชจ๋ธ๋ก ํ์ฉ ๊ฐ๋ฅํฉ๋๋ค.
๐ Training Results (Full Dataset)
| Parameter | Value |
|---|---|
| GPU | NVIDIA Tesla V100 (32GB) |
| Training Duration | 03:47:33 |
| Data Size | 436,660 samples (Full) |
| Batch Size | 64 |
| Learning Rate | 3e-5 |
| Max Sequence Length | 256 |
| Epochs | 2.0 |
Final Evaluation Metrics (on Test Set)
- ํ๊ฐ ์ํ ์: 2,000๊ฐ
- ์ ํ๋ (Accuracy): 0.4505
- ์ ๋ฐ๋ (Precision): 0.3684
- ์ฌํ์จ (Recall): 0.0693
- F1 ์ ์ (F1 Score): 0.4189
- ํ๊ท ์์ธก ์ ๋ขฐ๋: 0.3908
- ์ค๋ถ๋ฅ์จ: 54.9%
์นดํ ๊ณ ๋ฆฌ๋ณ ์ฑ๋ฅ (F1 Score ๊ธฐ์ค):
- ์ต๊ณ ์ฑ๋ฅ: ์ ์น๊ฐํ (F1: 0.621)
- ์ต์ ์ฑ๋ฅ: ๋์ฐ์ด์ด (F1: 0.000)
- ํ๊ท F1 Score: 0.317
๐ Usage
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
model_id = "rudalson/klue-bert-classification-petitions"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "์ฒญ์ ๋ด์ฉ ์์: ์ฐ๋ฆฌ ๋๋ค ๊ณต์์ ์์ ์ ๊ฐํํด์ฃผ์ธ์."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
- Downloads last month
- 6
Model tree for rudalson/klue-bert-classification-petitions
Base model
klue/bert-base

