paiheng commited on
Commit
d7af4c0
·
verified ·
1 Parent(s): babd230

Upload on-task BERT classifier

Browse files
Files changed (6) hide show
  1. README.md +40 -0
  2. config.json +39 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +15 -0
  6. training_args.bin +3 -0
README.md CHANGED
@@ -1,3 +1,43 @@
1
  ---
 
 
2
  license: mit
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: mit
5
+ library_name: transformers
6
+ pipeline_tag: text-classification
7
+ base_model: google-bert/bert-base-uncased
8
+ tags:
9
+ - education
10
  ---
11
+
12
+ # On-Task BERT
13
+
14
+ This model classifies a student's classroom utterance as **off-task** (`0`) or
15
+ **on-task** (`1`). It is a BERT-base-uncased sequence classifier fine-tuned on
16
+ English student utterances from mathematics classroom transcripts.
17
+
18
+
19
+ ## Evaluation
20
+
21
+ The final model was selected using five-fold cross-validation on the training
22
+ and validation data, retrained on 1,878 examples, and evaluated once on a held-out
23
+ test set of 470 examples.
24
+
25
+ | Metric | Result |
26
+ | --- | ---: |
27
+ | Accuracy | 0.900 |
28
+ | Macro F1 | 0.813 |
29
+ | On-task precision | 0.935 |
30
+ | On-task recall | 0.947 |
31
+ | On-task F1 | 0.941 |
32
+
33
+ The test confusion counts were 372 true positives, 26 false positives, 21 false
34
+ negatives, and 51 true negatives. On the same test split, a math-vocabulary
35
+ baseline achieved 0.849 accuracy and 0.559 macro F1.
36
+
37
+ ## Training details
38
+
39
+ - Base model: `bert-base-uncased`
40
+ - Maximum sequence length: 256
41
+ - Epochs: 5
42
+ - Learning rate: 3e-5
43
+ - Input: student utterance only
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "off_task",
17
+ "1": "on_task"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "is_decoder": false,
22
+ "label2id": {
23
+ "off_task": 0,
24
+ "on_task": 1
25
+ },
26
+ "layer_norm_eps": 1e-12,
27
+ "max_position_embeddings": 512,
28
+ "model_type": "bert",
29
+ "num_attention_heads": 12,
30
+ "num_hidden_layers": 12,
31
+ "pad_token_id": 0,
32
+ "position_embedding_type": "absolute",
33
+ "problem_type": "single_label_classification",
34
+ "tie_word_embeddings": true,
35
+ "transformers_version": "5.10.2",
36
+ "type_vocab_size": 2,
37
+ "use_cache": false,
38
+ "vocab_size": 30522
39
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe058fe073dbcc3ccbb6630a4aa5a6d56ed5a3d1c1de4f50350e590acc6e6aaf
3
+ size 437958624
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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e0ca78c1abe6f6db6b6c961587b1aae528f81270b504da69957ed9a0ba28b7b
3
+ size 5265