File size: 1,161 Bytes
7fbd67f
aa07fee
7fbd67f
b98c752
7fbd67f
894a7d6
 
7fbd67f
 
 
 
 
 
dfa96d1
 
 
 
 
 
 
c96f744
 
 
dfa96d1
c96f744
 
 
 
 
 
 
 
 
dfa96d1
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
### Model information
  * language : Korean
  * fine tuning data : [klue-tc (a.k.a. YNAT) ](https://klue-benchmark.com/tasks/66/overview/description)
  * License : CC-BY-SA 4.0
  * Base model : [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased)
  * input : news headline
  * output : topic

----
### Train information
 * train_runtime: 1477.3876 
 * train_steps_per_second: 2.416 
 * train_loss: 0.3722160959110207 
 * epoch: 5.0
 
----
### How to use
```
from transformers import AutoTokenizer, AutoModelForSequenceClassification
  
tokenizer = AutoTokenizer.from_pretrained (
"seongju/klue-tc-bert-base-multilingual-cased"
)

model = AutoModelForSequenceClassification.from_pretrained (
"seongju/klue-tc-bert-base-multilingual-cased"
)
mapping = {0: 'IT๊ณผํ•™', 1: '๊ฒฝ์ œ', 2: '์‚ฌํšŒ', 
3: '์ƒํ™œ๋ฌธํ™”', 4: '์„ธ๊ณ„', 5: '์Šคํฌ์ธ ', 6: '์ •์น˜'}
inputs = tokenizer(
"๋ฐฑ์‹  ํšŒํ”ผ ๊ฐ€๋Šฅ์„ฑ? ๋‚จ๋ฏธ์—์„œ ์ƒˆ๋กœ์šด ๋ณ€์ด ๋ฐ”์ด๋Ÿฌ์Šค ๊ธ‰์† ํ™•์‚ฐ ",
 padding=True, truncation=True, max_length=128, return_tensors="pt"
 )
outputs = model(**inputs)
probs = outputs[0].softmax(1)
output = mapping[probs.argmax().item()]
```