roberta-base-japanese-wrime-finetuned

モデルの説明

ku-nlp/roberta-base-japanese-char-wwm をベースモデルにして、

wrime の感情解析タスク(主観のみ)を finetuned したモデルです。

データは wrime Ver2 によるものです。

デモはこちらで試せます

使い方

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained("Lycoris53/roberta-base-japanese-wrime-finetuned")
model = RobertaForSequenceClassification.from_pretrained("Lycoris53/roberta-base-japanese-wrime-finetuned", num_labels=8, problem_type='regression')
model.to(device)

text_to_predict = "おはようございます。今日も一緒に頑張りましょう!"
inputs = tokenizer(text_to_predict, return_tensors="pt", truncation=True, max_length=512)
inputs.to(device)

with torch.no_grad(): # Disable gradient calculations for inference
    outputs = model(**inputs)
    
logits = F.softmax(outputs.logits.cpu()[0]).tolist()
...

ライセンスに関しては wrime の元データは Attribution-NonCommercial-NoDerivatives 4.0 のため

同じように付けました。

Downloads last month
12
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Lycoris53/roberta-base-japanese-wrime-finetuned

Finetuned
(2)
this model

Dataset used to train Lycoris53/roberta-base-japanese-wrime-finetuned