Downloads · 30 days
20
12% of all-time downloads
matt0513/drug-detection-xlm-roberta-v3
drug-detection-xlm-roberta-v3 is a text classification model from matt0513. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
判斷網頁是否為毒品販售站台的二元分類模型,基於 XLM-RoBERTa(base), 用於淡江大學「多模態毒品交易防制系統」專題。
Downloads · 30 days
20
12% of all-time downloads
All-time downloads
162
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
判斷網頁是否為毒品販售站台的二元分類模型,基於 XLM-RoBERTa(base), 用於淡江大學「多模態毒品交易防制系統」專題。
| 項目 | 內容 |
|---|---|
| 架構 | XLM-RoBERTa base(12 層) |
| 任務 | 二元分類 |
| 輸入 | 網頁純文字 |
| 輸出 | LABEL_0:一般網站 LABEL_1:毒品販售網站 |
| 語言 | 多語(網頁常見中英夾雜) |
from transformers import pipeline
clf = pipeline("text-classification",
model="matt0513/drug-detection-xlm-roberta-v3",
truncation=True, max_length=256, top_k=None)
clf("網頁純文字內容")
# [[{'label': 'LABEL_1', 'score': ...}, {'label': 'LABEL_0', 'score': ...}]]
輸出的 score 是 softmax 值,未經校準,不宜直接當作機率解讀。
系統實際使用時會另外做機率校準後再套用門檻。
在與訓練資料網域零重疊、人工標註的真實網頁上,ROC-AUC 為 0.938。