返回模型
说明文档
RyanGao/mental-roberta-depression-onnx
这是 karangupta224/mental_roberta_depression 的 ONNX 转换版本,用于 Transformers.js 以及浏览器/无服务器部署。
模型描述
任务: 抑郁症检测的文本分类
基础模型: 基于 mental/mental-roberta-base,这是一个在心理健康相关 Reddit 帖子上预训练的 RoBERTa 模型。
标签: depression(抑郁)/ non-depression(非抑郁)
预期用途
该模型设计用于:
- 心理健康内容分析
- 文本中的危机检测
- 识别可能需要帮助的个人的支持系统
- 心理健康 NLP 研究目的
⚠️ 重要提示: 该模型不能替代专业的心理健康诊断。它应仅作为筛查工具使用,任何表现出心理困扰迹象的人都应被转介给合格的心理健康专业人员。
性能
原始 PyTorch 模型指标:
- 详细指标请参阅原始模型
使用方法
使用 Transformers.js
import { pipeline } from '@xenova/transformers';
const classifier = await pipeline('text-classification', 'RyanGao/mental-roberta-depression-onnx');
const result = await classifier('I feel very sad and hopeless');
console.log(result);
使用 Python (ONNX Runtime)
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer
model = ORTModelForSequenceClassification.from_pretrained("RyanGao/mental-roberta-depression-onnx")
tokenizer = AutoTokenizer.from_pretrained("RyanGao/mental-roberta-depression-onnx")
inputs = tokenizer("I feel very sad and hopeless", return_tensors="pt")
outputs = model(**inputs)
训练数据
原始模型是在心理健康相关数据集上微调的。详情请参阅原始模型卡片。
局限性和偏差
- 领域特定: 在 Reddit 心理健康帖子上训练,可能无法推广到其他平台
- 语言: 仅支持英语
- 偏差: 可能反映训练数据中存在的偏差
- 非诊断性: 不能也不应用于临床诊断
伦理考量
- 隐私: 处理个人心理健康数据时要谨慎
- 伤害预防: 作为包含人工监督的更大型系统的一部分使用
- 假阴性: 模型可能会遗漏某些困扰案例
- 假阳性: 可能会标记实际上并不表示困扰的内容
引用
如果您使用此模型,请引用原始 MentalRoBERTa 论文:
@inproceedings{ji2022mentalbert,
title = {{MentalBERT: Publicly Available Pretrained Language Models for Mental Healthcare}},
author = {Shaoxiong Ji and Tianlin Zhang and Luna Ansari and Jie Fu and Prayag Tiwari and Erik Cambria},
year = {2022},
booktitle = {Proceedings of LREC}
}
联系方式
- 转换者: RyanGao
- 原始模型: karangupta224/mental_roberta_depression
- 问题: 请在模型仓库报告任何问题
许可证
该模型采用 CC-BY-NC-4.0 许可,与原始模型相同。
RyanGao/mental-roberta-depression-onnx
作者 RyanGao
text-classification
transformers.js
↓ 0
♥ 0
创建时间: 2025-11-13 21:39:11+00:00
更新时间: 2026-02-05 03:31:08+00:00
在 Hugging Face 上查看文件 (11)
.gitattributes
README.md
config.json
merges.txt
model.onnx
ONNX
onnx/model.onnx
ONNX
onnx/model_quantized.onnx
ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json