raghavdw commited on
Commit
ae8080a
·
verified ·
1 Parent(s): cc6076d

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-classification
4
+ - customer-service
5
+ - intent-detection
6
+ library_name: transformers
7
+ language: en
8
+ license: apache-2.0
9
+ ---
10
+
11
+ # Customer Service Intent Model
12
+
13
+ ## Model Description
14
+ Intent classification model for customer service interactions. Handles:
15
+ - Intent Detection
16
+ - Topic Classification
17
+ - Sentiment Analysis
18
+
19
+ This is part of a dual-model approach:
20
+ 1. This model (Intent/Topic/Sentiment)
21
+ 2. Empathy model (available at raghavdw/cci-capstone-asapp-empathy)
22
+
23
+ ## Latest Training Info
24
+ ```json
25
+ {
26
+ "metrics": {
27
+ "intent_accuracy": 0,
28
+ "topic_accuracy": 0,
29
+ "sentiment_accuracy": 0
30
+ },
31
+ "training_args": {
32
+ "output_dir": "models/test_run_20250110_162536/intent_model",
33
+ "overwrite_output_dir": false,
34
+ "do_train": false,
35
+ "do_eval": true,
36
+ "do_predict": false,
37
+ "eval_strategy": "epoch",
38
+ "prediction_loss_only": false,
39
+ "per_device_train_batch_size": 16,
40
+ "per_device_eval_batch_size": 32,
41
+ "per_gpu_train_batch_size": null,
42
+ "per_gpu_eval_batch_size": null,
43
+ "gradient_accumulation_steps": 1,
44
+ "eval_accumulation_steps": null,
45
+ "eval_delay": 0,
46
+ "torch_empty_cache_steps": null,
47
+ "learning_rate": 2e-05,
48
+ "weight_decay": 0.01,
49
+ "adam_beta1": 0.9,
50
+ "adam_beta2": 0.999,
51
+ "adam_epsilon": 1e-08,
52
+ "max_grad_norm": 1.0,
53
+ "num_train_epochs": 3,
54
+ "max_steps": -1,
55
+ "lr_scheduler_type": "linear",
56
+ "lr_scheduler_kwargs": {},
57
+ "warmup_ratio": 0.1,
58
+ "warmup_steps": 0,
59
+ "log_level": "passive",
60
+ "log_level_replica": "warning",
61
+ "log_on_each_node": true,
62
+ "logging_dir": "models/test_run_20250110_162536/logs",
63
+ "logging_strategy": "steps",
64
+ "logging_first_step": true,
65
+ "logging_steps": 10,
66
+ "logging_nan_inf_filter": true,
67
+ "save_strategy": "epoch",
68
+ "save_steps": 500,
69
+ "save_total_limit": 2,
70
+ "save_safetensors": true,
71
+ "save_on_each_node": false,
72
+ "save_only_model": false,
73
+ "restore_callback_states_from_checkpoint": false,
74
+ "no_cuda": false,
75
+ "use_cpu": false,
76
+ "use_mps_device": false,
77
+ "seed": 42,
78
+ "data_seed": null,
79
+ "jit_mode_eval": false,
80
+ "use_ipex": false,
81
+ "bf16": false,
82
+ "fp16": false,
83
+ "fp16_opt_level": "O1",
84
+ "half_precision_backend": "auto",
85
+ "bf16_full_eval": false,
86
+ "fp16_full_eval": false,
87
+ "tf32": null,
88
+ "local_rank": 0,
89
+ "ddp_backend": null,
90
+ "tpu_num_cores": null,
91
+ "tpu_metrics_debug": false,
92
+ "debug": [],
93
+ "dataloader_drop_last": false,
94
+ "eval_steps": null,
95
+ "dataloader_num_workers": 0,
96
+ "dataloader_prefetch_factor": null,
97
+ "past_index": -1,
98
+ "run_name": "models/test_run_20250110_162536/intent_model",
99
+ "disable_tqdm": false,
100
+ "remove_unused_columns": true,
101
+ "label_names": null,
102
+ "load_best_model_at_end": true,
103
+ "metric_for_best_model": "eval_loss",
104
+ "greater_is_better": false,
105
+ "ignore_data_skip": false,
106
+ "fsdp": [],
107
+ "fsdp_min_num_params": 0,
108
+ "fsdp_config": {
109
+ "min_num_params": 0,
110
+ "xla": false,
111
+ "xla_fsdp_v2": false,
112
+ "xla_fsdp_grad_ckpt": false
113
+ },
114
+ "fsdp_transformer_layer_cls_to_wrap": null,
115
+ "accelerator_config": {
116
+ "split_batches": false,
117
+ "dispatch_batches": null,
118
+ "even_batches": true,
119
+ "use_seedable_sampler": true,
120
+ "non_blocking": false,
121
+ "gradient_accumulation_kwargs": null
122
+ },
123
+ "deepspeed": null,
124
+ "label_smoothing_factor": 0.0,
125
+ "optim": "adamw_torch",
126
+ "optim_args": null,
127
+ "adafactor": false,
128
+ "group_by_length": false,
129
+ "length_column_name": "length",
130
+ "report_to": [],
131
+ "ddp_find_unused_parameters": null,
132
+ "ddp_bucket_cap_mb": null,
133
+ "ddp_broadcast_buffers": null,
134
+ "dataloader_pin_memory": true,
135
+ "dataloader_persistent_workers": false,
136
+ "skip_memory_metrics": true,
137
+ "use_legacy_prediction_loop": false,
138
+ "push_to_hub": false,
139
+ "resume_from_checkpoint": null,
140
+ "hub_model_id": null,
141
+ "hub_strategy": "every_save",
142
+ "hub_token": "<HUB_TOKEN>",
143
+ "hub_private_repo": false,
144
+ "hub_always_push": false,
145
+ "gradient_checkpointing": false,
146
+ "gradient_checkpointing_kwargs": null,
147
+ "include_inputs_for_metrics": false,
148
+ "include_for_metrics": [],
149
+ "eval_do_concat_batches": true,
150
+ "fp16_backend": "auto",
151
+ "evaluation_strategy": "epoch",
152
+ "push_to_hub_model_id": null,
153
+ "push_to_hub_organization": null,
154
+ "push_to_hub_token": "<PUSH_TO_HUB_TOKEN>",
155
+ "mp_parameters": "",
156
+ "auto_find_batch_size": false,
157
+ "full_determinism": false,
158
+ "torchdynamo": null,
159
+ "ray_scope": "last",
160
+ "ddp_timeout": 1800,
161
+ "torch_compile": false,
162
+ "torch_compile_backend": null,
163
+ "torch_compile_mode": null,
164
+ "dispatch_batches": null,
165
+ "split_batches": null,
166
+ "include_tokens_per_second": false,
167
+ "include_num_input_tokens_seen": false,
168
+ "neftune_noise_alpha": null,
169
+ "optim_target_modules": null,
170
+ "batch_eval_metrics": false,
171
+ "eval_on_start": false,
172
+ "use_liger_kernel": false,
173
+ "eval_use_gather_object": false,
174
+ "average_tokens_across_devices": false
175
+ },
176
+ "final_loss": 1.6091885400633528
177
+ }
178
+ ```
179
+
180
+ ## Usage Example
181
+ ```python
182
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
183
+
184
+ # Load intent model
185
+ model = AutoModelForSequenceClassification.from_pretrained("raghavdw/cci-capstone-asapp")
186
+ tokenizer = AutoTokenizer.from_pretrained("raghavdw/cci-capstone-asapp")
187
+
188
+ # Process text
189
+ text = "I need help with my flight booking"
190
+ inputs = tokenizer(text, return_tensors="pt")
191
+ outputs = model(**inputs)
192
+ ```
193
+
194
+ Last Updated: 2025-01-10 19:10:31
config.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/electra-base-discriminator",
3
+ "architectures": [
4
+ "ElectraForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "embedding_size": 768,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1",
15
+ "2": "LABEL_2",
16
+ "3": "LABEL_3",
17
+ "4": "LABEL_4",
18
+ "5": "LABEL_5",
19
+ "6": "LABEL_6",
20
+ "7": "LABEL_7",
21
+ "8": "LABEL_8",
22
+ "9": "LABEL_9",
23
+ "10": "LABEL_10",
24
+ "11": "LABEL_11",
25
+ "12": "LABEL_12",
26
+ "13": "LABEL_13",
27
+ "14": "LABEL_14",
28
+ "15": "LABEL_15",
29
+ "16": "LABEL_16",
30
+ "17": "LABEL_17",
31
+ "18": "LABEL_18",
32
+ "19": "LABEL_19",
33
+ "20": "LABEL_20",
34
+ "21": "LABEL_21",
35
+ "22": "LABEL_22",
36
+ "23": "LABEL_23",
37
+ "24": "LABEL_24",
38
+ "25": "LABEL_25",
39
+ "26": "LABEL_26",
40
+ "27": "LABEL_27",
41
+ "28": "LABEL_28",
42
+ "29": "LABEL_29",
43
+ "30": "LABEL_30",
44
+ "31": "LABEL_31",
45
+ "32": "LABEL_32",
46
+ "33": "LABEL_33",
47
+ "34": "LABEL_34",
48
+ "35": "LABEL_35",
49
+ "36": "LABEL_36",
50
+ "37": "LABEL_37"
51
+ },
52
+ "initializer_range": 0.02,
53
+ "intermediate_size": 3072,
54
+ "label2id": {
55
+ "LABEL_0": 0,
56
+ "LABEL_1": 1,
57
+ "LABEL_10": 10,
58
+ "LABEL_11": 11,
59
+ "LABEL_12": 12,
60
+ "LABEL_13": 13,
61
+ "LABEL_14": 14,
62
+ "LABEL_15": 15,
63
+ "LABEL_16": 16,
64
+ "LABEL_17": 17,
65
+ "LABEL_18": 18,
66
+ "LABEL_19": 19,
67
+ "LABEL_2": 2,
68
+ "LABEL_20": 20,
69
+ "LABEL_21": 21,
70
+ "LABEL_22": 22,
71
+ "LABEL_23": 23,
72
+ "LABEL_24": 24,
73
+ "LABEL_25": 25,
74
+ "LABEL_26": 26,
75
+ "LABEL_27": 27,
76
+ "LABEL_28": 28,
77
+ "LABEL_29": 29,
78
+ "LABEL_3": 3,
79
+ "LABEL_30": 30,
80
+ "LABEL_31": 31,
81
+ "LABEL_32": 32,
82
+ "LABEL_33": 33,
83
+ "LABEL_34": 34,
84
+ "LABEL_35": 35,
85
+ "LABEL_36": 36,
86
+ "LABEL_37": 37,
87
+ "LABEL_4": 4,
88
+ "LABEL_5": 5,
89
+ "LABEL_6": 6,
90
+ "LABEL_7": 7,
91
+ "LABEL_8": 8,
92
+ "LABEL_9": 9
93
+ },
94
+ "layer_norm_eps": 1e-12,
95
+ "max_position_embeddings": 512,
96
+ "model_type": "electra",
97
+ "num_attention_heads": 12,
98
+ "num_hidden_layers": 12,
99
+ "pad_token_id": 0,
100
+ "position_embedding_type": "absolute",
101
+ "problem_type": "multi_label_classification",
102
+ "summary_activation": "gelu",
103
+ "summary_last_dropout": 0.1,
104
+ "summary_type": "first",
105
+ "summary_use_proj": true,
106
+ "torch_dtype": "float32",
107
+ "transformers_version": "4.46.3",
108
+ "type_vocab_size": 2,
109
+ "use_cache": true,
110
+ "vocab_size": 30522
111
+ }
label_maps.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Predicted_Intent": {
3
+ "AccountAccess": 0,
4
+ "BaggageClaim": 1,
5
+ "CancelFlight": 2,
6
+ "ChangeFlight": 3,
7
+ "CheckFlightStatus": 4,
8
+ "Complaint": 5,
9
+ "CreditCardInquiry": 6,
10
+ "GeneralInquiry": 7,
11
+ "GetRefund": 8,
12
+ "In-FlightEntertainment": 9,
13
+ "MileageInquiry": 10,
14
+ "Other": 11,
15
+ "PetTravel": 12,
16
+ "ProvideInformation": 13,
17
+ "RequestAssistance": 14,
18
+ "UpgradeRequest": 15
19
+ },
20
+ "Topic_Name": {
21
+ "Account Access": 0,
22
+ "Baggage Claim": 1,
23
+ "Cancel Flight": 2,
24
+ "Change Flight": 3,
25
+ "Check Flight Status": 4,
26
+ "Complaint": 5,
27
+ "Credit Card Inquiry": 6,
28
+ "General Inquiry": 7,
29
+ "Get Refund": 8,
30
+ "In-Flight Entertainment": 9,
31
+ "Mileage Inquiry": 10,
32
+ "Other": 11,
33
+ "Pet Travel": 12,
34
+ "Provide Information": 13,
35
+ "Request Assistance": 14,
36
+ "Upgrade Request": 15
37
+ },
38
+ "Sentiment": {
39
+ "NEGATIVE": 0,
40
+ "POSITIVE": 1
41
+ },
42
+ "fallback_type": {
43
+ "intent mismatch": 0,
44
+ "no fallback": 1,
45
+ "other fallback": 2,
46
+ "unknown query": 3
47
+ }
48
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9874e1c8c4f59d2e71b4bff8f237258651dbae49b1d95682d56ce110e35c4e4c
3
+ size 438069984
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,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "mask_token": "[MASK]",
48
+ "model_max_length": 512,
49
+ "pad_token": "[PAD]",
50
+ "sep_token": "[SEP]",
51
+ "strip_accents": null,
52
+ "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "ElectraTokenizer",
54
+ "unk_token": "[UNK]"
55
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91fcaabf344f40b0aa177724830cad507a49881d1fffcdbc010c4f7524cdfbbf
3
+ size 5304
vocab.txt ADDED
The diff for this file is too large to render. See raw diff