Downloads · 30 days
50
22% of all-time downloads
Lycoris53/roberta-base-japanese-wrime-finetuned
roberta-base-japanese-wrime-finetuned is a machine learning model from Lycoris53. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-4.0.
ku-nlp/roberta-base-japanese-char-wwm をベースモデルにして、
Downloads · 30 days
50
22% of all-time downloads
All-time downloads
231
Public
Parameters
100M
401 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors401 MB · 100%
From the Hugging Face model README
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 のため
同じように付けました。