Instructions to use ZhiyangQi97/japanese-x-ragebait-line-distilbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZhiyangQi97/japanese-x-ragebait-line-distilbert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ZhiyangQi97/japanese-x-ragebait-line-distilbert-base", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ZhiyangQi97/japanese-x-ragebait-line-distilbert-base", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("ZhiyangQi97/japanese-x-ragebait-line-distilbert-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Japanese X Ragebait - LINE DistilBERT Base
This is the LINE DistilBERT component of the three-model ragebait detector from โFrom Detection to Characterization: A Large-Scale Study of Ragebait on Japanese Xโ (WI-IAT 2026). It is a binary Japanese text classifier fine-tuned from line-corporation/line-distilbert-base-japanese.
Labels
NO(0): non-ragebaitYES(1): ragebait
The labels are research annotations and should not be treated as facts about a post or its author.
Training
- Labeled split: 16,558 posts, balanced between
YESandNO - Train/validation partition: 14,902 / 1,656
- Held-out test split: 2,000 posts, balanced between
YESandNO - Epochs: 3
- Learning rate:
2e-5 - Batch size: 32
- Maximum sequence length: 256
- Warmup ratio: 0.1
- Weight decay: 0.01
- Seed: 42
- Best checkpoint criterion: validation Macro-F1
The public dataset repository contains only Post IDs and labels, not redistributed post text: ZhiyangQi/japanese-x-ragebait.
Test results
| Metric | Value |
|---|---|
| Accuracy | 82.65% |
Precision (YES) |
81.79% |
Recall (YES) |
84.00% |
| Macro-F1 | 82.65% |
The confusion matrix is [[813, 187], [160, 840]], ordered as NO, YES. Full training history and unrounded values are in training_results.json.
Usage
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "ZhiyangQi97/japanese-x-ragebait-line-distilbert-base"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
use_fast=False,
trust_remote_code=True,
)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "ๅ้กใใใๆฅๆฌ่ชใใญในใ"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.inference_mode():
prediction = model(**inputs).logits.argmax(dim=-1).item()
print(model.config.id2label[prediction])
Install transformers, torch, sentencepiece, fugashi, and unidic-lite before loading the tokenizer. Review the included custom tokenizer code before enabling trust_remote_code=True.
Limitations and intended use
This model is intended for non-commercial academic research on Japanese ragebait. The training labels were created with an LLM-assisted pipeline and may contain errors. Ragebait is contextual and intent-based; performance may degrade on other periods, platforms, languages, or domains. Do not use this model to profile, rank, target, identify, harass, moderate, or make consequential decisions about individual users.
License
The base model is distributed under the Apache License 2.0. See the base model card for its terms and documentation.
Citation
@inproceedings{qi2026ragebait,
title = {From Detection to Characterization: A Large-Scale Study of Ragebait on Japanese X},
author = {Qi, Zhiyang and Ito, Kazuhiro and Chen, Jinghui and Nakamura, Hibiki and Chen, Zhangxuan and Murata, Erina and Chujyo, Masaki and Toriumi, Fujio},
booktitle = {WI-IAT 2026},
year = {2026}
}
- Downloads last month
- 10
Model tree for ZhiyangQi97/japanese-x-ragebait-line-distilbert-base
Evaluation results
- Accuracy on Japanese X Ragebait test splitself-reported0.827
- Precision (YES) on Japanese X Ragebait test splitself-reported0.818
- Recall (YES) on Japanese X Ragebait test splitself-reported0.840
- Macro-F1 on Japanese X Ragebait test splitself-reported0.826