Bakobiibizo commited on
Commit
71eb967
·
verified ·
1 Parent(s): 8e70837
.gitattributes CHANGED
@@ -1,35 +1,12 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
  *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
1
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
2
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
 
 
 
 
4
  *.h5 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  *.tflite filter=lfs diff=lfs merge=lfs -text
6
+ *.tar.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.ot filter=lfs diff=lfs merge=lfs -text
8
+ *.onnx filter=lfs diff=lfs merge=lfs -text
9
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
10
+ runs/Mar22_01-22-16_dsmtyh100xx0153/events.out.tfevents.1711070537.dsmtyh100xx0153.4107907.0 filter=lfs diff=lfs merge=lfs -text
11
+ runs/Mar22_01-58-04_dsmtyh100xx0153/events.out.tfevents.1711072685.dsmtyh100xx0153.4141967.0 filter=lfs diff=lfs merge=lfs -text
12
+ runs/Mar22_06-16-00_dsmtyh100xx0153/events.out.tfevents.1711088160.dsmtyh100xx0153.156772.0 filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ## TextAttack Model Card
2
+ This `bert-base-uncased` model was fine-tuned for sequence classification using TextAttack
3
+ and the yelp_polarity dataset loaded using the `nlp` library. The model was fine-tuned
4
+ for 5 epochs with a batch size of 16, a learning
5
+ rate of 5e-05, and a maximum sequence length of 256.
6
+ Since this was a classification task, the model was trained with a cross-entropy loss function.
7
+ The best score the model achieved on this task was 0.9699473684210527, as measured by the
8
+ eval set accuracy, found after 4 epochs.
9
+
10
+ For more information, check out [TextAttack on Github](https://github.com/QData/TextAttack).
config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForSequenceClassification"
4
+ ],
5
+ "model_name": "my_model",
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "finetuning_task": "yelp_polarity",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "type_vocab_size": 2,
21
+ "vocab_size": 30522
22
+ }
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80c93148809240ce872694c420e0b28a6d5048518edd50f91b9ac4f2825be5d5
3
+ size 437942328
log.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Writing logs to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/log.txt.
2
+ Loading nlp dataset yelp_polarity, split train.
3
+ Loading nlp dataset yelp_polarity, split test.
4
+ Loaded dataset. Found: 2 labels: ([0, 1])
5
+ Loading transformers AutoModelForSequenceClassification: bert-base-uncased
6
+ Tokenizing training data. (len: 560000)
7
+ Tokenizing eval data (len: 38000)
8
+ Loaded data and tokenized in 720.6436557769775s
9
+ Using torch.nn.DataParallel.
10
+ Training model across 4 GPUs
11
+ Wrote original training args to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/train_args.json.
12
+ ***** Running training *****
13
+ Num examples = 560000
14
+ Batch size = 16
15
+ Max sequence length = 256
16
+ Num steps = 175000
17
+ Num epochs = 5
18
+ Learning rate = 5e-05
19
+ Eval accuracy: 95.95263157894736%
20
+ Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
21
+ Eval accuracy: 96.59473684210526%
22
+ Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
23
+ Eval accuracy: 96.69473684210527%
24
+ Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
25
+ Eval accuracy: 96.91052631578947%
26
+ Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
27
+ Eval accuracy: 96.99473684210527%
28
+ Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
29
+ Finished training. Re-loading and evaluating model from disk.
30
+ Loading transformers AutoModelForSequenceClassification: bert-base-uncased
31
+ Eval of saved model accuracy: 96.99473684210527%
32
+ Saved tokenizer <textattack.models.tokenizers.auto_tokenizer.AutoTokenizer object at 0x7fcc548eb730> to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/.
33
+ Wrote README to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/README.md.
34
+ Wrote final training args to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/train_args.json.
outputs/last_model/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": "LSTMForClassification",
3
+ "hidden_size": 150,
4
+ "depth": 1,
5
+ "dropout": 0.3,
6
+ "num_labels": 2,
7
+ "max_seq_length": 128,
8
+ "model_path": null,
9
+ "emb_layer_trainable": true
10
+ }
outputs/last_model/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b2b5d5ee6a89c8983119c70a2533f4c564266cac9e75d6c4063a6c124237529
3
+ size 320670479
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:934989a6c6465c39311acbb466e8e27e4a715539c3baa95c7c66b424a6c27a66
3
+ size 437985387
runs/Mar22_01-22-16_dsmtyh100xx0153/events.out.tfevents.1711070537.dsmtyh100xx0153.4107907.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6111d8c294b444df3fd36c3b6f89f3bb94f171378739f9c3319685205dbb688c
3
+ size 4611
runs/Mar22_01-58-04_dsmtyh100xx0153/events.out.tfevents.1711072685.dsmtyh100xx0153.4141967.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65ec1882ef54182df948fc55b077c1772881802c93b895f6e6f2a357a336a290
3
+ size 4611
runs/Mar22_06-16-00_dsmtyh100xx0153/events.out.tfevents.1711088160.dsmtyh100xx0153.156772.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9281542ad5ddc27cbb571b8e31bd287a3defe268d4258f16c0f1c3be34f821d
3
+ size 4611
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": true, "model_max_length": 512}
train_args.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "bert-base-uncased",
3
+ "dataset": "yelp_polarity",
4
+ "dataset_train_split": "train",
5
+ "dataset_dev_split": "test",
6
+ "tb_writer_step": 1000,
7
+ "checkpoint_steps": -1,
8
+ "checkpoint_every_epoch": false,
9
+ "num_train_epochs": 5,
10
+ "early_stopping_epochs": -1,
11
+ "batch_size": 16,
12
+ "max_length": 256,
13
+ "learning_rate": 5e-05,
14
+ "grad_accum_steps": 1,
15
+ "warmup_proportion": 0.1,
16
+ "config_name": "config.json",
17
+ "weights_name": "pytorch_model.bin",
18
+ "enable_wandb": false,
19
+ "output_dir": "/p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/bert-base-uncased-yelp_polarity-2020-07-08-10:42/",
20
+ "num_labels": 2,
21
+ "do_regression": false,
22
+ "best_eval_score": 0.9699473684210527,
23
+ "best_eval_score_epoch": 4,
24
+ "epochs_since_best_eval_score": 0
25
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d353037f945468aa95fe1a5029d9a81e6ddc9e0c380a50912a7731a06f54c0ee
3
+ size 203
training_args.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "output_dir": "my_model",
3
+ "overwrite_output_dir": false,
4
+ "do_train": false,
5
+ "do_eval": false,
6
+ "do_predict": false,
7
+ "evaluation_strategy": "no",
8
+ "prediction_loss_only": false,
9
+ "per_device_train_batch_size": 8,
10
+ "per_device_eval_batch_size": 8,
11
+ "per_gpu_train_batch_size": null,
12
+ "per_gpu_eval_batch_size": null,
13
+ "gradient_accumulation_steps": 1,
14
+ "eval_accumulation_steps": null,
15
+ "eval_delay": 0,
16
+ "learning_rate": 5e-05,
17
+ "weight_decay": 0.0,
18
+ "adam_beta1": 0.9,
19
+ "adam_beta2": 0.999,
20
+ "adam_epsilon": 1e-08,
21
+ "max_grad_norm": 1.0,
22
+ "num_train_epochs": 3.0,
23
+ "max_steps": -1,
24
+ "lr_scheduler_type": "linear",
25
+ "lr_scheduler_kwargs": {},
26
+ "warmup_ratio": 0.0,
27
+ "warmup_steps": 0,
28
+ "log_level": "passive",
29
+ "log_level_replica": "warning",
30
+ "log_on_each_node": true,
31
+ "logging_dir": "my_model/training_args.json/runs/Mar22_01-08-45_dsmtyh100xx0153",
32
+ "logging_strategy": "steps",
33
+ "logging_first_step": false,
34
+ "logging_steps": 500,
35
+ "logging_nan_inf_filter": true,
36
+ "save_strategy": "steps",
37
+ "save_steps": 500,
38
+ "save_total_limit": null,
39
+ "save_safetensors": true,
40
+ "save_on_each_node": false,
41
+ "save_only_model": false,
42
+ "no_cuda": false,
43
+ "use_cpu": false,
44
+ "use_mps_device": false,
45
+ "seed": 42,
46
+ "data_seed": null,
47
+ "jit_mode_eval": false,
48
+ "use_ipex": false,
49
+ "bf16": false,
50
+ "fp16": false,
51
+ "fp16_opt_level": "O1",
52
+ "half_precision_backend": "auto",
53
+ "bf16_full_eval": false,
54
+ "fp16_full_eval": false,
55
+ "tf32": null,
56
+ "local_rank": 0,
57
+ "ddp_backend": null,
58
+ "tpu_num_cores": null,
59
+ "tpu_metrics_debug": false,
60
+ "debug": [],
61
+ "dataloader_drop_last": false,
62
+ "eval_steps": null,
63
+ "dataloader_num_workers": 0,
64
+ "dataloader_prefetch_factor": null,
65
+ "past_index": -1,
66
+ "run_name": "my_model",
67
+ "disable_tqdm": false,
68
+ "remove_unused_columns": true,
69
+ "label_names": null,
70
+ "load_best_model_at_end": false,
71
+ "metric_for_best_model": null,
72
+ "greater_is_better": null,
73
+ "ignore_data_skip": false,
74
+ "fsdp": [],
75
+ "fsdp_min_num_params": 0,
76
+ "fsdp_config": {
77
+ "min_num_params": 0,
78
+ "xla": false,
79
+ "xla_fsdp_v2": false,
80
+ "xla_fsdp_grad_ckpt": false
81
+ },
82
+ "fsdp_transformer_layer_cls_to_wrap": null,
83
+ "accelerator_config": {
84
+ "split_batches": false,
85
+ "dispatch_batches": null,
86
+ "even_batches": true,
87
+ "use_seedable_sampler": true
88
+ },
89
+ "deepspeed": null,
90
+ "label_smoothing_factor": 0.0,
91
+ "optim": "adamw_torch",
92
+ "optim_args": null,
93
+ "adafactor": false,
94
+ "group_by_length": false,
95
+ "length_column_name": "length",
96
+ "report_to": [],
97
+ "ddp_find_unused_parameters": null,
98
+ "ddp_bucket_cap_mb": null,
99
+ "ddp_broadcast_buffers": null,
100
+ "dataloader_pin_memory": true,
101
+ "dataloader_persistent_workers": false,
102
+ "skip_memory_metrics": true,
103
+ "use_legacy_prediction_loop": false,
104
+ "push_to_hub": false,
105
+ "resume_from_checkpoint": null,
106
+ "hub_model_id": null,
107
+ "hub_strategy": "every_save",
108
+ "hub_token": "<HUB_TOKEN>",
109
+ "hub_private_repo": false,
110
+ "hub_always_push": false,
111
+ "gradient_checkpointing": false,
112
+ "gradient_checkpointing_kwargs": null,
113
+ "include_inputs_for_metrics": false,
114
+ "fp16_backend": "auto",
115
+ "push_to_hub_model_id": null,
116
+ "push_to_hub_organization": null,
117
+ "push_to_hub_token": "<PUSH_TO_HUB_TOKEN>",
118
+ "mp_parameters": "",
119
+ "auto_find_batch_size": false,
120
+ "full_determinism": false,
121
+ "torchdynamo": null,
122
+ "ray_scope": "last",
123
+ "ddp_timeout": 1800,
124
+ "torch_compile": false,
125
+ "torch_compile_backend": null,
126
+ "torch_compile_mode": null,
127
+ "dispatch_batches": null,
128
+ "split_batches": null,
129
+ "include_tokens_per_second": false,
130
+ "include_num_input_tokens_seen": false,
131
+ "neftune_noise_alpha": null
132
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff