--- license: mit --- --- **v2モデルを以下のリンク先にリリースしました** [oshizo/japanese-sexual-moderation-v2](https://huggingface.co/oshizo/japanese-sexual-moderation-v2) --- japanese-sexual-moderationは、[studio-ousia/luke-japanese-large-lite](https://huggingface.co/studio-ousia/luke-japanese-large-lite)をファインチューニングしたモデルです。 短文が性的かどうかをスコアリングします。 20230/9/17時点のバージョンは限られたデータ数で訓練されており、スコアリングの傾向にはデータセットに起因するバイアスがある可能性があります。 このモデルは[japanese-llm-roleplay-benchmark](https://github.com/oshizo/japanese-llm-roleplay-benchmark)でのERPスコアを算出するために作成されました。 ## Usage ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer import numpy as np model_id = "oshizo/japanese-sexual-moderation" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForSequenceClassification.from_pretrained( model_id, problem_type="multi_label_classification", num_labels=1 ) text = "富士山は日本で一番高い山です。" with torch.no_grad(): encoding = tokenizer(text, return_tensors="pt") score = model(**encoding).logits # tensor([[-2.7863]]) ```