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