baptiste-pasquier commited on
Commit
ef176de
1 Parent(s): 4e3cafa

first model

Browse files
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ## TextAttack Model Card
2
+
3
+ This `cmarkea/distilcamembert-base` model was fine-tuned using TextAttackand the `allocine` dataset loaded using the `datasets` library. The model was fine-tuned
4
+ for 1 epochs with a batch size of 16,
5
+ a maximum sequence length of 512, and an initial learning rate of 5e-05.
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.9692, as measured by the
8
+ eval set accuracy, found after 1 epoch.
9
+
10
+ For more information, check out [TextAttack on Github](https://github.com/QData/TextAttack).
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "cmarkea/distilcamembert-base",
3
+ "architectures": [
4
+ "CamembertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "camembert",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 6,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.26.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 32005
28
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:556004d4af12dfeee38a8f4aadc5ab961bcf74b235a00cc1f7fe08cf09d2fd15
3
+ size 272425205
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
3
+ size 810912
special_tokens_map.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</s>",
9
+ "mask_token": {
10
+ "content": "<mask>",
11
+ "lstrip": true,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<pad>",
17
+ "sep_token": "</s>",
18
+ "unk_token": "<unk>"
19
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</s>",
9
+ "mask_token": {
10
+ "__type": "AddedToken",
11
+ "content": "<mask>",
12
+ "lstrip": true,
13
+ "normalized": true,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ "model_max_length": 512,
18
+ "name_or_path": "cmarkea/distilcamembert-base",
19
+ "pad_token": "<pad>",
20
+ "sep_token": "</s>",
21
+ "sp_model_kwargs": {},
22
+ "special_tokens_map_file": null,
23
+ "tokenizer_class": "CamembertTokenizer",
24
+ "unk_token": "<unk>"
25
+ }
train_log.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Writing logs to ./outputs/2023-02-13-00-40-42-038240/train_log.txt.
2
+ Wrote original training args to ./outputs/2023-02-13-00-40-42-038240/training_args.json.
3
+ ***** Running training *****
4
+ Num examples = 160000
5
+ Num epochs = 1
6
+ Num clean epochs = 1
7
+ Instantaneous batch size per device = 16
8
+ Total train batch size (w. parallel, distributed & accumulation) = 16
9
+ Gradient accumulation steps = 1
10
+ Total optimization steps = 10000
11
+ ==========================================================
12
+ Epoch 1
13
+ Running clean epoch 1/1
14
+ Train accuracy: 95.02%
15
+ Eval accuracy: 96.92%
16
+ Best score found. Saved model to ./outputs/2023-02-13-00-40-42-038240/best_model/
17
+ Wrote README to ./outputs/2023-02-13-00-40-42-038240/README.md.
training_args.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name_or_path": "cmarkea/distilcamembert-base",
3
+ "attack": null,
4
+ "dataset": "allocine",
5
+ "task_type": "classification",
6
+ "model_max_length": null,
7
+ "model_num_labels": null,
8
+ "dataset_train_split": "train",
9
+ "dataset_eval_split": "validation",
10
+ "filter_train_by_labels": null,
11
+ "filter_eval_by_labels": null,
12
+ "num_epochs": 1,
13
+ "num_clean_epochs": 1,
14
+ "attack_epoch_interval": 1,
15
+ "early_stopping_epochs": null,
16
+ "learning_rate": 5e-05,
17
+ "num_warmup_steps": 500,
18
+ "weight_decay": 0.01,
19
+ "per_device_train_batch_size": 16,
20
+ "per_device_eval_batch_size": 32,
21
+ "gradient_accumulation_steps": 1,
22
+ "random_seed": 786,
23
+ "parallel": false,
24
+ "load_best_model_at_end": false,
25
+ "alpha": 1.0,
26
+ "num_train_adv_examples": -1,
27
+ "query_budget_train": null,
28
+ "attack_num_workers_per_device": 1,
29
+ "output_dir": "./outputs/2023-02-13-00-40-42-038240",
30
+ "checkpoint_interval_steps": null,
31
+ "checkpoint_interval_epochs": null,
32
+ "save_last": true,
33
+ "log_to_tb": true,
34
+ "tb_log_dir": null,
35
+ "log_to_wandb": false,
36
+ "wandb_project": "textattack",
37
+ "logging_interval_step": 1
38
+ }