Views
No views yet
klue/bert-base)을 한국 청와대 국민청원 데이터셋(heegyu/korean-petitions)으로 Fine-tuning하여 청원 내용을 자동으로 카테고리 별로 분류합니다.
정치개혁, 외교/통일/국방, 일자리, 미래, 성장동력, 농산어촌, 보건복지, 마을공동체, 경제민주화, 안전/환경, 주거/20대, 인권/성평등, 문화/예술/체육/언론, 반려동물, 교통/건축/국토, 행정, 기타| 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 |


1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4model_id = "rudalson/klue-bert-classification-petitions"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForSequenceClassification.from_pretrained(model_id)
7
8text = "청원 내용 예시: 우리 동네 공원의 안전을 강화해주세요."
9inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
10
11with torch.no_grad():
12 logits = model(**inputs).logits
13 predicted_class_id = logits.argmax().item()
14