Hydragon123 commited on
Commit
b9ced2d
·
verified ·
1 Parent(s): 1ac4f77

BERT task-type classifier trained on AIDev v3 labels

Browse files
Files changed (5) hide show
  1. README.md +57 -0
  2. config.json +59 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +15 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ base_model: google-bert/bert-base-uncased
4
+ datasets:
5
+ - hao-li/AIDev
6
+ pipeline_tag: text-classification
7
+ language:
8
+ - en
9
+ ---
10
+
11
+ # aidev-task-type-bert
12
+
13
+ `bert-base-uncased` fine-tuned to classify AI-agent pull requests into Conventional Commit task types
14
+ (`build, chore, ci, docs, feat, fix, other, perf, refactor, revert, style, test`).
15
+
16
+ AIDev dropped the `pr_task_type` table after v3. This model labels newer releases (v4, v5).
17
+
18
+ ## Training
19
+
20
+ - Labels: `hao-li/AIDev@v3` `pr_task_type` (LLM-generated), joined to v3 `pull_request`. 33,596 PRs.
21
+ - Input: `title + "\n\n" + body`, truncated to 256 tokens.
22
+ - 3 epochs, lr 2e-5, batch 32, AdamW, linear warmup 6%, fp16, T4 GPU.
23
+ - 90/10 stratified split, seed 42.
24
+
25
+ ## Validation (3,360 held-out PRs)
26
+
27
+ | metric | value |
28
+ |---|---|
29
+ | accuracy | 0.894 |
30
+ | weighted F1 | 0.893 |
31
+ | macro F1 | 0.627 |
32
+
33
+ | class | F1 | support |
34
+ |---|---|---|
35
+ | fix | 0.947 | 811 |
36
+ | feat | 0.925 | 1445 |
37
+ | docs | 0.917 | 389 |
38
+ | test | 0.900 | 236 |
39
+ | ci | 0.763 | 41 |
40
+ | refactor | 0.746 | 229 |
41
+ | perf | 0.742 | 34 |
42
+ | chore | 0.639 | 89 |
43
+ | build | 0.516 | 63 |
44
+ | style | 0.429 | 19 |
45
+ | other | 0.000 | 3 |
46
+ | revert | 0.000 | 1 |
47
+
48
+ `other` and `revert` have 31 and 16 training rows; model never predicts them.
49
+ Labels inherit any error in the v3 LLM annotations.
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ from transformers import pipeline
55
+ clf = pipeline("text-classification", model="Hydragon123/aidev-task-type-bert", truncation=True, max_length=256)
56
+ clf("fix: handle null user in login\n\nCrash when user is None.")
57
+ ```
config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": null,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": null,
11
+ "gradient_checkpointing": false,
12
+ "hidden_act": "gelu",
13
+ "hidden_dropout_prob": 0.1,
14
+ "hidden_size": 768,
15
+ "id2label": {
16
+ "0": "build",
17
+ "1": "chore",
18
+ "2": "ci",
19
+ "3": "docs",
20
+ "4": "feat",
21
+ "5": "fix",
22
+ "6": "other",
23
+ "7": "perf",
24
+ "8": "refactor",
25
+ "9": "revert",
26
+ "10": "style",
27
+ "11": "test"
28
+ },
29
+ "initializer_range": 0.02,
30
+ "intermediate_size": 3072,
31
+ "is_decoder": false,
32
+ "label2id": {
33
+ "build": 0,
34
+ "chore": 1,
35
+ "ci": 2,
36
+ "docs": 3,
37
+ "feat": 4,
38
+ "fix": 5,
39
+ "other": 6,
40
+ "perf": 7,
41
+ "refactor": 8,
42
+ "revert": 9,
43
+ "style": 10,
44
+ "test": 11
45
+ },
46
+ "layer_norm_eps": 1e-12,
47
+ "max_position_embeddings": 512,
48
+ "model_type": "bert",
49
+ "num_attention_heads": 12,
50
+ "num_hidden_layers": 12,
51
+ "pad_token_id": 0,
52
+ "position_embedding_type": "absolute",
53
+ "problem_type": "single_label_classification",
54
+ "tie_word_embeddings": true,
55
+ "transformers_version": "5.22.1",
56
+ "type_vocab_size": 2,
57
+ "use_cache": true,
58
+ "vocab_size": 30522
59
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84152fe8e581b55c2f5652db40227807581d4fb29c91500b662bc8363d5d9a66
3
+ size 437989384
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": true,
5
+ "is_local": false,
6
+ "local_files_only": false,
7
+ "mask_token": "[MASK]",
8
+ "model_max_length": 512,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "strip_accents": null,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }