Initial model upload
Browse files- README.md +62 -3
- config.json +39 -0
- model.safetensors +3 -0
- model_card.json +35 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,62 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: distilbert-base-uncased
|
4 |
+
tags:
|
5 |
+
- text-classification
|
6 |
+
- log-analysis
|
7 |
+
- openstack
|
8 |
+
- distilbert
|
9 |
+
- fine-tuned
|
10 |
+
datasets:
|
11 |
+
- custom
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
pipeline_tag: text-classification
|
15 |
+
---
|
16 |
+
|
17 |
+
# INFRNCE BERT Log Classification Model
|
18 |
+
|
19 |
+
This is a fine-tuned DistilBERT model for classifying OpenStack Nova log entries into different operational categories.
|
20 |
+
|
21 |
+
## Model Details
|
22 |
+
|
23 |
+
- **Base Model**: distilbert-base-uncased
|
24 |
+
- **Task**: Multi-class text classification
|
25 |
+
- **Number of Labels**: 6
|
26 |
+
- **Domain**: OpenStack log analysis
|
27 |
+
|
28 |
+
## Labels
|
29 |
+
|
30 |
+
The model classifies logs into the following categories:
|
31 |
+
|
32 |
+
- Error_Handling, - Instance_Management, - Network_Operations, - Resource_Management, - Scheduler_Operations, - System_Operations
|
33 |
+
|
34 |
+
## Usage
|
35 |
+
|
36 |
+
```python
|
37 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
38 |
+
import torch
|
39 |
+
|
40 |
+
# Load the model and tokenizer
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained("your-username/infrnce-bert-log-classifier")
|
42 |
+
model = AutoModelForSequenceClassification.from_pretrained("your-username/infrnce-bert-log-classifier")
|
43 |
+
|
44 |
+
# Example usage
|
45 |
+
log_text = "Your OpenStack log entry here"
|
46 |
+
inputs = tokenizer(log_text, return_tensors="pt", truncation=True, padding=True, max_length=512)
|
47 |
+
|
48 |
+
with torch.no_grad():
|
49 |
+
outputs = model(**inputs)
|
50 |
+
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
51 |
+
predicted_class_id = predictions.argmax().item()
|
52 |
+
|
53 |
+
print(f"Predicted class: {model.config.id2label[predicted_class_id]}")
|
54 |
+
```
|
55 |
+
|
56 |
+
## Training Data
|
57 |
+
|
58 |
+
The model was trained on a curated dataset of OpenStack Nova logs with both regex-based classifications and semantic clustering.
|
59 |
+
|
60 |
+
## Performance
|
61 |
+
|
62 |
+
The model was trained with controlled accuracy to achieve optimal performance on log classification tasks.
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation": "gelu",
|
3 |
+
"architectures": [
|
4 |
+
"DistilBertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.1,
|
7 |
+
"dim": 768,
|
8 |
+
"dropout": 0.1,
|
9 |
+
"hidden_dim": 3072,
|
10 |
+
"id2label": {
|
11 |
+
"0": "Error_Handling",
|
12 |
+
"1": "Instance_Management",
|
13 |
+
"2": "Network_Operations",
|
14 |
+
"3": "Resource_Management",
|
15 |
+
"4": "Scheduler_Operations",
|
16 |
+
"5": "System_Operations"
|
17 |
+
},
|
18 |
+
"initializer_range": 0.02,
|
19 |
+
"label2id": {
|
20 |
+
"Error_Handling": 0,
|
21 |
+
"Instance_Management": 1,
|
22 |
+
"Network_Operations": 2,
|
23 |
+
"Resource_Management": 3,
|
24 |
+
"Scheduler_Operations": 4,
|
25 |
+
"System_Operations": 5
|
26 |
+
},
|
27 |
+
"max_position_embeddings": 512,
|
28 |
+
"model_type": "distilbert",
|
29 |
+
"n_heads": 12,
|
30 |
+
"n_layers": 6,
|
31 |
+
"pad_token_id": 0,
|
32 |
+
"qa_dropout": 0.1,
|
33 |
+
"seq_classif_dropout": 0.2,
|
34 |
+
"sinusoidal_pos_embds": false,
|
35 |
+
"tie_weights_": true,
|
36 |
+
"torch_dtype": "float32",
|
37 |
+
"transformers_version": "4.52.4",
|
38 |
+
"vocab_size": 30522
|
39 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab781f978a05e0b0db557e066a1f8fdc1bef2805c41fd62f4c0cae585b900855
|
3 |
+
size 267844872
|
model_card.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "distilbert",
|
3 |
+
"task": "text-classification",
|
4 |
+
"tags": [
|
5 |
+
"log-analysis",
|
6 |
+
"openstack",
|
7 |
+
"text-classification"
|
8 |
+
],
|
9 |
+
"base_model": "distilbert-base-uncased",
|
10 |
+
"num_labels": 6,
|
11 |
+
"labels": [
|
12 |
+
"Error_Handling",
|
13 |
+
"Instance_Management",
|
14 |
+
"Network_Operations",
|
15 |
+
"Resource_Management",
|
16 |
+
"Scheduler_Operations",
|
17 |
+
"System_Operations"
|
18 |
+
],
|
19 |
+
"id2label": {
|
20 |
+
"0": "Error_Handling",
|
21 |
+
"1": "Instance_Management",
|
22 |
+
"2": "Network_Operations",
|
23 |
+
"3": "Resource_Management",
|
24 |
+
"4": "Scheduler_Operations",
|
25 |
+
"5": "System_Operations"
|
26 |
+
},
|
27 |
+
"label2id": {
|
28 |
+
"Error_Handling": 0,
|
29 |
+
"Instance_Management": 1,
|
30 |
+
"Network_Operations": 2,
|
31 |
+
"Resource_Management": 3,
|
32 |
+
"Scheduler_Operations": 4,
|
33 |
+
"System_Operations": 5
|
34 |
+
}
|
35 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": false,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"extra_special_tokens": {},
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"pad_token": "[PAD]",
|
51 |
+
"sep_token": "[SEP]",
|
52 |
+
"strip_accents": null,
|
53 |
+
"tokenize_chinese_chars": true,
|
54 |
+
"tokenizer_class": "DistilBertTokenizer",
|
55 |
+
"unk_token": "[UNK]"
|
56 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|