antreaspiece commited on
Commit
e0a38cb
·
verified ·
1 Parent(s): c167b65

Upload best classification model (flan-t5-small)

Browse files
Files changed (5) hide show
  1. README.md +73 -0
  2. config.json +80 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +113 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language: en
4
+ tags:
5
+ - temporal
6
+ - time-module
7
+ - pieces
8
+ - intent-classification
9
+ - temporal-intent
10
+ datasets:
11
+ - Pieces/temporal-intent-classification-dataset-split
12
+ base_model: google/flan-t5-small
13
+ metrics:
14
+ - accuracy
15
+ - f1
16
+ pipeline_tag: text-classification
17
+ ---
18
+
19
+ # TIME-Module: Classification — flan-t5-small
20
+
21
+ ## Model Description
22
+
23
+ Temporal intent classification model trained on the split dataset. Classifies user queries into 6 temporal intent categories: Action Scheduling, Content Retrieval, Current Status, Future Information/Planning, Non-Temporal, and Temporal - General.
24
+
25
+ ## Training Details
26
+
27
+ - **Base Model:** [google/flan-t5-small](https://huggingface.co/google/flan-t5-small)
28
+ - **Architecture:** T5ForSequenceClassification
29
+ - **Dataset:** [Pieces/temporal-intent-classification-dataset-split](https://huggingface.co/datasets/Pieces/temporal-intent-classification-dataset-split) (15,488 train / 1,721 val / 4,303 test)
30
+ - **Training Steps:** 17,500
31
+ - **Learning Rate:** 3e-4
32
+ - **Batch Size:** 64 × 2
33
+ - **Mixed Precision:** bf16
34
+ - **Hardware:** NVIDIA RTX 4090 (24 GB)
35
+
36
+ ## Results
37
+
38
+ | Metric | Value |
39
+ |--------|-------|
40
+ | accuracy | 95.91% |
41
+ | f1_weighted | ~95.9% |
42
+
43
+ ## Usage
44
+
45
+ ```python
46
+ from transformers import pipeline
47
+
48
+ pipe = pipeline('text-classification', model='Pieces/time-classification-flan-t5-small-split-best')
49
+ result = pipe('What meetings do I have tomorrow?')
50
+
51
+
52
+
53
+ ```
54
+
55
+ ## Part of the TIME-Module Project
56
+
57
+ This model is part of the TIME (Temporal Intent, Mapping, and Extraction) module, a suite of models for understanding and processing temporal information in natural language.
58
+
59
+ **Related models:**
60
+ - [Pieces/time-classification-flan-t5-small-split-best](https://huggingface.co/Pieces/time-classification-flan-t5-small-split-best) — Intent classification
61
+ - [Pieces/time-mapping-flan-t5-small-quality-best](https://huggingface.co/Pieces/time-mapping-flan-t5-small-quality-best) — Span prediction (best)
62
+ - [Pieces/time-mapping-t5gemma-270m-best](https://huggingface.co/Pieces/time-mapping-t5gemma-270m-best) — Span prediction (T5Gemma)
63
+
64
+ ## Citation
65
+
66
+ ```bibtex
67
+ @software{time_module,
68
+ title={TIME-Module: Temporal Intent, Mapping, and Extraction},
69
+ author={Pieces},
70
+ year={2026},
71
+ url={https://huggingface.co/Pieces}
72
+ }
73
+ ```
config.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "T5ForSequenceClassification"
4
+ ],
5
+ "classifier_dropout": 0.0,
6
+ "d_ff": 1024,
7
+ "d_kv": 64,
8
+ "d_model": 512,
9
+ "decoder_start_token_id": 0,
10
+ "dense_act_fn": "gelu_new",
11
+ "dropout_rate": 0.1,
12
+ "dtype": "float32",
13
+ "eos_token_id": 1,
14
+ "feed_forward_proj": "gated-gelu",
15
+ "id2label": {
16
+ "0": "Action/Scheduling",
17
+ "1": "Content Retrieval",
18
+ "2": "Current Status",
19
+ "3": "Future Information/Planning",
20
+ "4": "Non-Temporal",
21
+ "5": "Temporal - General"
22
+ },
23
+ "initializer_factor": 1.0,
24
+ "is_decoder": false,
25
+ "is_encoder_decoder": true,
26
+ "is_gated_act": true,
27
+ "label2id": {
28
+ "Action/Scheduling": 0,
29
+ "Content Retrieval": 1,
30
+ "Current Status": 2,
31
+ "Future Information/Planning": 3,
32
+ "Non-Temporal": 4,
33
+ "Temporal - General": 5
34
+ },
35
+ "layer_norm_epsilon": 1e-06,
36
+ "model_type": "t5",
37
+ "n_positions": 512,
38
+ "num_decoder_layers": 8,
39
+ "num_heads": 6,
40
+ "num_layers": 8,
41
+ "output_past": true,
42
+ "pad_token_id": 0,
43
+ "problem_type": "single_label_classification",
44
+ "relative_attention_max_distance": 128,
45
+ "relative_attention_num_buckets": 32,
46
+ "scale_decoder_outputs": true,
47
+ "task_specific_params": {
48
+ "summarization": {
49
+ "early_stopping": true,
50
+ "length_penalty": 2.0,
51
+ "max_length": 200,
52
+ "min_length": 30,
53
+ "no_repeat_ngram_size": 3,
54
+ "num_beams": 4,
55
+ "prefix": "summarize: "
56
+ },
57
+ "translation_en_to_de": {
58
+ "early_stopping": true,
59
+ "max_length": 300,
60
+ "num_beams": 4,
61
+ "prefix": "translate English to German: "
62
+ },
63
+ "translation_en_to_fr": {
64
+ "early_stopping": true,
65
+ "max_length": 300,
66
+ "num_beams": 4,
67
+ "prefix": "translate English to French: "
68
+ },
69
+ "translation_en_to_ro": {
70
+ "early_stopping": true,
71
+ "max_length": 300,
72
+ "num_beams": 4,
73
+ "prefix": "translate English to Romanian: "
74
+ }
75
+ },
76
+ "tie_word_embeddings": true,
77
+ "transformers_version": "5.0.0",
78
+ "use_cache": true,
79
+ "vocab_size": 32128
80
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56abfddd0415f79b114438620eee5f8ef3c0734b656d66453b2b32e892537072
3
+ size 243134408
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "eos_token": "</s>",
4
+ "extra_ids": 100,
5
+ "extra_special_tokens": [
6
+ "<extra_id_0>",
7
+ "<extra_id_1>",
8
+ "<extra_id_2>",
9
+ "<extra_id_3>",
10
+ "<extra_id_4>",
11
+ "<extra_id_5>",
12
+ "<extra_id_6>",
13
+ "<extra_id_7>",
14
+ "<extra_id_8>",
15
+ "<extra_id_9>",
16
+ "<extra_id_10>",
17
+ "<extra_id_11>",
18
+ "<extra_id_12>",
19
+ "<extra_id_13>",
20
+ "<extra_id_14>",
21
+ "<extra_id_15>",
22
+ "<extra_id_16>",
23
+ "<extra_id_17>",
24
+ "<extra_id_18>",
25
+ "<extra_id_19>",
26
+ "<extra_id_20>",
27
+ "<extra_id_21>",
28
+ "<extra_id_22>",
29
+ "<extra_id_23>",
30
+ "<extra_id_24>",
31
+ "<extra_id_25>",
32
+ "<extra_id_26>",
33
+ "<extra_id_27>",
34
+ "<extra_id_28>",
35
+ "<extra_id_29>",
36
+ "<extra_id_30>",
37
+ "<extra_id_31>",
38
+ "<extra_id_32>",
39
+ "<extra_id_33>",
40
+ "<extra_id_34>",
41
+ "<extra_id_35>",
42
+ "<extra_id_36>",
43
+ "<extra_id_37>",
44
+ "<extra_id_38>",
45
+ "<extra_id_39>",
46
+ "<extra_id_40>",
47
+ "<extra_id_41>",
48
+ "<extra_id_42>",
49
+ "<extra_id_43>",
50
+ "<extra_id_44>",
51
+ "<extra_id_45>",
52
+ "<extra_id_46>",
53
+ "<extra_id_47>",
54
+ "<extra_id_48>",
55
+ "<extra_id_49>",
56
+ "<extra_id_50>",
57
+ "<extra_id_51>",
58
+ "<extra_id_52>",
59
+ "<extra_id_53>",
60
+ "<extra_id_54>",
61
+ "<extra_id_55>",
62
+ "<extra_id_56>",
63
+ "<extra_id_57>",
64
+ "<extra_id_58>",
65
+ "<extra_id_59>",
66
+ "<extra_id_60>",
67
+ "<extra_id_61>",
68
+ "<extra_id_62>",
69
+ "<extra_id_63>",
70
+ "<extra_id_64>",
71
+ "<extra_id_65>",
72
+ "<extra_id_66>",
73
+ "<extra_id_67>",
74
+ "<extra_id_68>",
75
+ "<extra_id_69>",
76
+ "<extra_id_70>",
77
+ "<extra_id_71>",
78
+ "<extra_id_72>",
79
+ "<extra_id_73>",
80
+ "<extra_id_74>",
81
+ "<extra_id_75>",
82
+ "<extra_id_76>",
83
+ "<extra_id_77>",
84
+ "<extra_id_78>",
85
+ "<extra_id_79>",
86
+ "<extra_id_80>",
87
+ "<extra_id_81>",
88
+ "<extra_id_82>",
89
+ "<extra_id_83>",
90
+ "<extra_id_84>",
91
+ "<extra_id_85>",
92
+ "<extra_id_86>",
93
+ "<extra_id_87>",
94
+ "<extra_id_88>",
95
+ "<extra_id_89>",
96
+ "<extra_id_90>",
97
+ "<extra_id_91>",
98
+ "<extra_id_92>",
99
+ "<extra_id_93>",
100
+ "<extra_id_94>",
101
+ "<extra_id_95>",
102
+ "<extra_id_96>",
103
+ "<extra_id_97>",
104
+ "<extra_id_98>",
105
+ "<extra_id_99>"
106
+ ],
107
+ "is_local": false,
108
+ "model_max_length": 512,
109
+ "pad_token": "<pad>",
110
+ "sp_model_kwargs": {},
111
+ "tokenizer_class": "T5Tokenizer",
112
+ "unk_token": "<unk>"
113
+ }