Edit model card

HuggingFaceFW/fineweb-edu-classifierを再現するために、日本語データでtohoku-nlp/bert-base-japanese-v3を学習したモデルです。

学習データは、oscar-corpus/OSCAR-2301の日本語サブセットから抽出した16913個の文書に対して、TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUFのQ3_Kを使ってスコアリングしたものを使用しています。 詳細: https://zenn.dev/kendama/articles/aba63f14f88e6e コード: https://github.com/kkendama/fineweb-edu-classifier-ja

使い方

from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Kendamarron/fineweb-edu-classifier-ja-v2")
model = AutoModelForSequenceClassification.from_pretrained("Kendamarron/fineweb-edu-classifier-ja-v2")
def predict(text):
    inputs = tokenizer(text, return_tensors="pt")
    outputs = model(**inputs)
    logits = outputs.logits
    predicted_class = torch.argmax(logits, dim=-1).item()
    return predicted_class
text = "富士山は、日本で最も有名な山であり、日本全土にわたる広大な自然公園の一つです。高さは3,776メートルで、日本で最も高い山です。富士山は、東京都、静岡県、山梨県の3つの県にまたがっています。"
print(predict(text))
# >> 2
Downloads last month
5
Safetensors
Model size
111M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.