KM35NCDF
该模型是基于sentence-transformers/all-MiniLM-L6-v2在软件需求数据集(SWARD)上微调的版本,用于分类19种非功能性需求。
下载量 74
发布时间 : 2/27/2023
模型简介
该模型主要用于软件需求分类,能够识别19种非功能性需求类型,包括可用性、访问控制、审计等。
模型特点
多类别分类
能够准确分类19种不同的非功能性软件需求。
高精度
在评估集上达到0.79的宏F1分数,表现优异。
易于使用
提供简单的API接口,方便快速集成到现有系统中。
模型能力
软件需求分类
非功能性需求识别
文本分类
使用案例
软件开发
需求分类
自动分类软件需求文档中的非功能性需求。
准确识别需求类型,如可用性、性能等。
项目管理
需求管理
帮助项目管理人员快速整理和分类需求。
提高需求管理效率,减少人工分类错误。
🚀 kasrahabib/KM35NCDF
本模型是 sentence-transformers/all-MiniLM-L6-v2 在软件需求数据集(SWARD)上的微调版本,用于对 19 种非功能需求进行分类。需要注意的是,根据文献,19 个类别中有两个类别(数据和行为)属于功能性软件需求类型。该模型在评估集上取得了以下结果:
- 训练损失:0.1691
- 验证损失:0.7548
- 训练轮数:14
- 最终宏 F1 分数:0.79
标签: 0 或 A -> 可用性; 1 或 AC -> 访问控制; 2 或 AU -> 审计; 3 或 B -> 行为; 4 或 D -> 数据; 5 或 FT -> 容错性; 6 或 I -> 接口/互操作性; 7 或 LE -> 法律; 8 或 LF -> 外观和感觉; 9 或 MN -> 可维护性; 10 或 O -> 操作性; 11 或 PE -> 性能; 12 或 PO -> 可移植性; 13 或 RL -> 可靠性; 14 或 SA -> 安全性; 15 或 SC -> 可扩展性; 16 或 SE -> 安全性; 17 或 ST -> 稳定性; 18 或 US -> 可用性;
🚀 快速开始
本部分将介绍模型的基本使用方法和相关信息。
✨ 主要特性
- 基于微调的预训练模型,能够对 19 种非功能需求进行分类。
- 在评估集上取得了较好的性能指标。
📦 安装指南
如果你想在本地使用该模型,可以按照以下步骤进行操作:
- 克隆仓库:
git lfs install
git clone url_of_repo
- 找到下载目录的路径。
- 将路径链接写入
model_ckpt
变量。
💻 使用示例
基础用法
from transformers import pipeline
frame_work = 'tf'
task = 'text-classification'
model_ckpt = 'kasrahabib/KM35NCDF '
software_requirment_cls = pipeline(task = task, model = model_ckpt, framework = frame_work)
example_1_US = 'Application needs to keep track of subtasks in a task.'
example_2_PE = 'The system shall allow users to enter time in several different formats.'
example_3_AC = 'The system shall allow users who hold any of the ORES/ORELSE/PROVIDER keys to be viewed as a clinical user and has full access privileges to all problem list options.'
software_requirment_cls([example_1_US, example_2_PE, example_3_AC])
[{'label': 'US', 'score': 0.9712953567504883},
{'label': 'PE', 'score': 0.9457865953445435},
{'label': 'AC', 'score': 0.9639136791229248}]
高级用法
import numpy as np
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
model_ckpt = 'kasrahabib/KM35NCDF '
tokenizer = AutoTokenizer.from_pretrained(model_ckpt)
model = TFAutoModelForSequenceClassification.from_pretrained(model_ckpt)
example_1_US = 'Application needs to keep track of subtasks in a task.'
example_2_PE = 'The system shall allow users to enter time in several different formats.'
example_3_AC = 'The system shall allow users who hold any of the ORES/ORELSE/PROVIDER keys to be viewed as a clinical user and has full access privileges to all problem list options.'
requirements = [example_1_US, example_2_PE, example_3_AC]
encoded_requirements = tokenizer(requirements, return_tensors = 'np', padding = 'longest')
y_pred = model(encoded_requirements).logits
classifications = np.argmax(y_pred, axis = 1)
classifications = [model.config.id2label[output] for output in classifications]
print(classifications)
['US', 'PE', 'AC']
本地下载使用
import numpy as np
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
model_ckpt = 'rest_of_the_path/KM35NCDF '
tokenizer = AutoTokenizer.from_pretrained(model_ckpt)
model = TFAutoModelForSequenceClassification.from_pretrained(model_ckpt)
example_1_US = 'Application needs to keep track of subtasks in a task.'
example_2_PE = 'The system shall allow users to enter time in several different formats.'
example_3_AC = 'The system shall allow users who hold any of the ORES/ORELSE/PROVIDER keys to be viewed as a clinical user and has full access privileges to all problem list options.'
requirements = [example_1_US, example_2_PE, example_3_AC]
encoded_requirements = tokenizer(requirements, return_tensors = 'np', padding = 'longest')
y_pred = model(encoded_requirements).logits
classifications = np.argmax(y_pred, axis = 1)
classifications = [model.config.id2label[output] for output in classifications]
print(classifications)
📚 详细文档
训练超参数
训练过程中使用了以下超参数:
- 优化器:
{'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 6735, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False}
- 训练精度:float32
框架版本
- Transformers 4.26.1
- TensorFlow 2.11.0
- Datasets 2.10.0
- Tokenizers 0.13.2
📄 许可证
本项目采用 Apache-2.0 许可证。
Distilbert Base Uncased Finetuned Sst 2 English
Apache-2.0
基于DistilBERT-base-uncased在SST-2情感分析数据集上微调的文本分类模型,准确率91.3%
文本分类 英语
D
distilbert
5.2M
746
Xlm Roberta Base Language Detection
MIT
基于XLM-RoBERTa的多语言检测模型,支持20种语言的文本分类
文本分类
Transformers 支持多种语言

X
papluca
2.7M
333
Roberta Hate Speech Dynabench R4 Target
该模型通过动态生成数据集来改进在线仇恨检测,专注于从最差案例中学习以提高检测效果。
文本分类
Transformers 英语

R
facebook
2.0M
80
Bert Base Multilingual Uncased Sentiment
MIT
基于bert-base-multilingual-uncased微调的多语言情感分析模型,支持6种语言的商品评论情感分析
文本分类 支持多种语言
B
nlptown
1.8M
371
Emotion English Distilroberta Base
基于DistilRoBERTa-base微调的英文文本情感分类模型,可预测埃克曼六种基本情绪及中性类别。
文本分类
Transformers 英语

E
j-hartmann
1.1M
402
Robertuito Sentiment Analysis
基于RoBERTuito的西班牙语推文情感分析模型,支持POS(积极)/NEG(消极)/NEU(中性)三类情感分类
文本分类 西班牙语
R
pysentimiento
1.0M
88
Finbert Tone
FinBERT是一款基于金融通讯文本预训练的BERT模型,专注于金融自然语言处理领域。finbert-tone是其微调版本,用于金融情感分析任务。
文本分类
Transformers 英语

F
yiyanghkust
998.46k
178
Roberta Base Go Emotions
MIT
基于RoBERTa-base的多标签情感分类模型,在go_emotions数据集上训练,支持28种情感标签识别。
文本分类
Transformers 英语

R
SamLowe
848.12k
565
Xlm Emo T
XLM-EMO是一个基于XLM-T模型微调的多语言情感分析模型,支持19种语言,专门针对社交媒体文本的情感预测。
文本分类
Transformers 其他

X
MilaNLProc
692.30k
7
Deberta V3 Base Mnli Fever Anli
MIT
基于MultiNLI、Fever-NLI和ANLI数据集训练的DeBERTa-v3模型,擅长零样本分类和自然语言推理任务
文本分类
Transformers 英语

D
MoritzLaurer
613.93k
204
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98