generated from Lightning-AI/deep-learning-project-template
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from unitaryai/lightweight_models
Added lightweight models
- Loading branch information
Showing
6 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "Jigsaw_ALBERT", | ||
"n_gpu": 1, | ||
"batch_size": 10, | ||
"accumulate_grad_batches": 3, | ||
"loss": "binary_cross_entropy", | ||
"arch": { | ||
"type": "ALBERT", | ||
"args": { | ||
"num_classes": 6, | ||
"model_type": "albert-base-v2", | ||
"model_name": "AlbertForSequenceClassification", | ||
"tokenizer_name": "AlbertTokenizer" | ||
} | ||
}, | ||
"dataset": { | ||
"type": "JigsawDataOriginal", | ||
"args": { | ||
"train_csv_file": "jigsaw_data/jigsaw-toxic-comment-classification-challenge/train.csv", | ||
"test_csv_file": "jigsaw_data/jigsaw-toxic-comment-classification-challenge/val.csv", | ||
"val_fraction": null, | ||
"create_val_set": false, | ||
"add_test_labels": false, | ||
"classes": [ | ||
"toxic", | ||
"severe_toxic", | ||
"obscene", | ||
"threat", | ||
"insult", | ||
"identity_hate" | ||
] | ||
} | ||
}, | ||
"optimizer": { | ||
"type": "Adam", | ||
"args": { | ||
"lr": 3e-5, | ||
"weight_decay": 3e-6, | ||
"amsgrad": true | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
configs/Unintended_bias_toxic_comment_classification_Albert.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "Jigsaw_ALBERT_bias", | ||
"n_gpu": 1, | ||
"batch_size": 10, | ||
"accumulate_grad_batches": 3, | ||
"num_main_classes": 7, | ||
"loss_weight": 0.75, | ||
"arch": { | ||
"type": "ALBERT", | ||
"args": { | ||
"num_classes": 16, | ||
"model_type": "albert-base-v2", | ||
"model_name": "AlbertForSequenceClassification", | ||
"tokenizer_name": "AlbertTokenizer" | ||
} | ||
}, | ||
"dataset": { | ||
"type": "JigsawDataBias", | ||
"args": { | ||
"train_csv_file": "jigsaw_data/jigsaw-unintended-bias-in-toxicity-classification/train.csv", | ||
"test_csv_file": "jigsaw_data/jigsaw-unintended-bias-in-toxicity-classification/test_public_expanded.csv", | ||
"val_fraction": null, | ||
"create_val_set": false, | ||
"loss_weight": 0.75, | ||
"classes": [ | ||
"toxicity", | ||
"severe_toxicity", | ||
"obscene", | ||
"identity_attack", | ||
"insult", | ||
"threat", | ||
"sexual_explicit" | ||
], | ||
"identity_classes": [ | ||
"male", | ||
"female", | ||
"homosexual_gay_or_lesbian", | ||
"christian", | ||
"jewish", | ||
"muslim", | ||
"black", | ||
"white", | ||
"psychiatric_or_mental_illness" | ||
] | ||
} | ||
}, | ||
"optimizer": { | ||
"type": "Adam", | ||
"args": { | ||
"lr": 3e-5, | ||
"weight_decay": 3e-6, | ||
"amsgrad": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters