Edit model card

Model information

KLAID(Korean Legal Artificial Intelligence Datasets) LJP classification model based on pretrained KLUE RoBERTa-base. See more information about KLUE: Github and Paper for more details.

How to use

NOTE: Use BertTokenizer instead of RobertaTokenizer and RobertaForSequenceClassification. (AutoTokenizer will load BertTokenizer)

import numpy as np
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("lawcompany/KLAID_LJP_base")
model = AutoModelForSequenceClassification.from_pretrained("lawcompany/KLAID_LJP_base")
model.eval()
input_data = tokenizer("피고인은 2022. 11. 14. 혈중알콜농도 0.123%의 술에 취한 상태로 승용차를 운전하였다.", 
                       max_length=512, 
                       return_tensors="pt")
logits = model(**input_data).logits.detach().numpy()
pred = np.argmax(logits)
# output
# 7

Licensing information

Copyright 2022-present Law&Company Co. Ltd.

Licensed under the CC-BY-NC-ND-4.0

Other Inquiries

Downloads last month
4