Run this model with HF Jobs

Run lawcompany/KLAID_LJP_base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/lawcompany/KLAID_LJP_base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/lawcompany/KLAID_LJP_base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

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
96
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for lawcompany/KLAID_LJP_base