Text Classification
Transformers
Safetensors
English
modernbert
bug-triage
bug-severity
sequence-classification
text-embeddings-inference
Instructions to use abhishes/modernbert-bug-severity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abhishes/modernbert-bug-severity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="abhishes/modernbert-bug-severity")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("abhishes/modernbert-bug-severity") model = AutoModelForSequenceClassification.from_pretrained("abhishes/modernbert-bug-severity", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload initial bug severity model
Browse files- README.md +115 -0
- config.json +95 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-classification
|
| 6 |
+
base_model: answerdotai/ModernBERT-base
|
| 7 |
+
datasets:
|
| 8 |
+
- AliArshad/Bugzilla_Eclipse_Bug_Reports_Dataset
|
| 9 |
+
metrics:
|
| 10 |
+
- accuracy
|
| 11 |
+
- f1
|
| 12 |
+
tags:
|
| 13 |
+
- modernbert
|
| 14 |
+
- bug-triage
|
| 15 |
+
- bug-severity
|
| 16 |
+
- sequence-classification
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# ModernBERT Bug Severity Classifier
|
| 20 |
+
|
| 21 |
+
This model is a fully fine-tuned version of
|
| 22 |
+
`answerdotai/ModernBERT-base` for classifying short bug descriptions
|
| 23 |
+
into six severity levels:
|
| 24 |
+
|
| 25 |
+
- blocker
|
| 26 |
+
- critical
|
| 27 |
+
- major
|
| 28 |
+
- normal
|
| 29 |
+
- minor
|
| 30 |
+
- trivial
|
| 31 |
+
|
| 32 |
+
## Intended use
|
| 33 |
+
|
| 34 |
+
This model is an educational demonstration of automated bug-severity
|
| 35 |
+
classification.
|
| 36 |
+
|
| 37 |
+
It should not be used as the sole authority for production severity
|
| 38 |
+
decisions. High-impact predictions should be reviewed by a human.
|
| 39 |
+
|
| 40 |
+
## Training dataset
|
| 41 |
+
|
| 42 |
+
The model was trained using:
|
| 43 |
+
|
| 44 |
+
`AliArshad/Bugzilla_Eclipse_Bug_Reports_Dataset`
|
| 45 |
+
|
| 46 |
+
Only the `Short Description` field was used as the model input. The
|
| 47 |
+
`Severity Label` field was used as the target label.
|
| 48 |
+
|
| 49 |
+
## Base model
|
| 50 |
+
|
| 51 |
+
`answerdotai/ModernBERT-base`
|
| 52 |
+
|
| 53 |
+
## Training approach
|
| 54 |
+
|
| 55 |
+
This model was trained using full fine-tuning. It is not a LoRA or
|
| 56 |
+
adapter-only model.
|
| 57 |
+
|
| 58 |
+
Training included:
|
| 59 |
+
|
| 60 |
+
- Removing missing and empty descriptions
|
| 61 |
+
- Converting severity names into numeric labels
|
| 62 |
+
- Stratified training, validation, and test splits
|
| 63 |
+
- Batched tokenization
|
| 64 |
+
- Dynamic padding and attention masks
|
| 65 |
+
- Hugging Face Trainer
|
| 66 |
+
- Macro F1 checkpoint selection
|
| 67 |
+
|
| 68 |
+
## Evaluation
|
| 69 |
+
|
| 70 |
+
- Test accuracy: 0.871
|
| 71 |
+
- Test macro F1: 0.32951261884727445
|
| 72 |
+
|
| 73 |
+
Performance should also be examined separately for each severity using
|
| 74 |
+
the classification report and confusion matrix.
|
| 75 |
+
|
| 76 |
+
## Limitations
|
| 77 |
+
|
| 78 |
+
- Severity cannot always be determined from a short description alone.
|
| 79 |
+
- The training dataset may contain noisy or inconsistent labels.
|
| 80 |
+
- The severity classes are imbalanced.
|
| 81 |
+
- Historical bug reports may not represent current software practices.
|
| 82 |
+
- Softmax confidence is not guaranteed to be a calibrated probability.
|
| 83 |
+
- Human review is recommended for blocker and critical predictions.
|
| 84 |
+
|
| 85 |
+
## License status
|
| 86 |
+
|
| 87 |
+
The ModernBERT base model uses the Apache 2.0 license. The training
|
| 88 |
+
dataset's Hugging Face page does not currently declare a dataset
|
| 89 |
+
license. Confirm the applicable dataset and source-data terms before
|
| 90 |
+
making this fine-tuned model public.
|
| 91 |
+
|
| 92 |
+
## Example usage
|
| 93 |
+
|
| 94 |
+
Install the required library:
|
| 95 |
+
|
| 96 |
+
pip install transformers torch
|
| 97 |
+
|
| 98 |
+
Run inference:
|
| 99 |
+
|
| 100 |
+
from transformers import pipeline
|
| 101 |
+
|
| 102 |
+
classifier = pipeline(
|
| 103 |
+
"text-classification",
|
| 104 |
+
model="abhishes/modernbert-bug-severity",
|
| 105 |
+
revision="v1.0.0"
|
| 106 |
+
)
|
| 107 |
+
|
| 108 |
+
bug_reports = [
|
| 109 |
+
"Application crashes immediately and all data is lost.",
|
| 110 |
+
"There is a spelling mistake in the documentation."
|
| 111 |
+
]
|
| 112 |
+
|
| 113 |
+
results = classifier(bug_reports)
|
| 114 |
+
|
| 115 |
+
print(results)
|
config.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 50281,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "float32",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": null,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"id2label": {
|
| 23 |
+
"0": "blocker",
|
| 24 |
+
"1": "critical",
|
| 25 |
+
"2": "major",
|
| 26 |
+
"3": "minor",
|
| 27 |
+
"4": "normal",
|
| 28 |
+
"5": "trivial"
|
| 29 |
+
},
|
| 30 |
+
"initializer_cutoff_factor": 2.0,
|
| 31 |
+
"initializer_range": 0.02,
|
| 32 |
+
"intermediate_size": 1152,
|
| 33 |
+
"label2id": {
|
| 34 |
+
"blocker": 0,
|
| 35 |
+
"critical": 1,
|
| 36 |
+
"major": 2,
|
| 37 |
+
"minor": 3,
|
| 38 |
+
"normal": 4,
|
| 39 |
+
"trivial": 5
|
| 40 |
+
},
|
| 41 |
+
"layer_norm_eps": 1e-05,
|
| 42 |
+
"layer_types": [
|
| 43 |
+
"full_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"sliding_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"sliding_attention",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"sliding_attention",
|
| 55 |
+
"full_attention",
|
| 56 |
+
"sliding_attention",
|
| 57 |
+
"sliding_attention",
|
| 58 |
+
"full_attention",
|
| 59 |
+
"sliding_attention",
|
| 60 |
+
"sliding_attention",
|
| 61 |
+
"full_attention",
|
| 62 |
+
"sliding_attention",
|
| 63 |
+
"sliding_attention",
|
| 64 |
+
"full_attention"
|
| 65 |
+
],
|
| 66 |
+
"local_attention": 128,
|
| 67 |
+
"max_position_embeddings": 8192,
|
| 68 |
+
"mlp_bias": false,
|
| 69 |
+
"mlp_dropout": 0.0,
|
| 70 |
+
"model_type": "modernbert",
|
| 71 |
+
"norm_bias": false,
|
| 72 |
+
"norm_eps": 1e-05,
|
| 73 |
+
"num_attention_heads": 12,
|
| 74 |
+
"num_hidden_layers": 22,
|
| 75 |
+
"pad_token_id": 50283,
|
| 76 |
+
"position_embedding_type": "absolute",
|
| 77 |
+
"problem_type": "single_label_classification",
|
| 78 |
+
"rope_parameters": {
|
| 79 |
+
"full_attention": {
|
| 80 |
+
"rope_theta": 160000.0,
|
| 81 |
+
"rope_type": "default"
|
| 82 |
+
},
|
| 83 |
+
"sliding_attention": {
|
| 84 |
+
"rope_theta": 10000.0,
|
| 85 |
+
"rope_type": "default"
|
| 86 |
+
}
|
| 87 |
+
},
|
| 88 |
+
"sep_token_id": 50282,
|
| 89 |
+
"sparse_pred_ignore_index": -100,
|
| 90 |
+
"sparse_prediction": false,
|
| 91 |
+
"tie_word_embeddings": true,
|
| 92 |
+
"transformers_version": "5.14.1",
|
| 93 |
+
"use_cache": false,
|
| 94 |
+
"vocab_size": 50368
|
| 95 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d297f1fc686f05bfb2933e2fae53dc3d70128a63eb451282c425cded6c6d2f8d
|
| 3 |
+
size 598452088
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
+
"mask_token": "[MASK]",
|
| 8 |
+
"model_input_names": [
|
| 9 |
+
"input_ids",
|
| 10 |
+
"attention_mask"
|
| 11 |
+
],
|
| 12 |
+
"model_max_length": 8192,
|
| 13 |
+
"pad_token": "[PAD]",
|
| 14 |
+
"sep_token": "[SEP]",
|
| 15 |
+
"tokenizer_class": "TokenizersBackend",
|
| 16 |
+
"unk_token": "[UNK]"
|
| 17 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:568d8066653a28572b586ea3950a85918512a63cd74860fd95e67e4e9cb66b61
|
| 3 |
+
size 5201
|