forked from Anirudh-Muthukumar/Causal-Mediation-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
attention_intervention_winogender.sh
31 lines (31 loc) · 2.27 KB
/
attention_intervention_winogender.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Note: these scripts are somewhat computationally expensive, so you may want to perform a subset only
#
# Perform attention intervention using bergsma statistics
#
python winogender_attn_intervention.py --gpt2-version distilgpt2 --do-filter True --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version distilgpt2 --do-filter False --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2 --do-filter True --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2 --do-filter False --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-medium --do-filter True --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-medium --do-filter False --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-large --do-filter True --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-large --do-filter False --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-xl --do-filter True --stat bergsma &&
python winogender_attn_intervention.py --gpt2-version gpt2-xl --do-filter False --stat bergsma &&
#
# Perform attention intervention using bls statistics
#
python winogender_attn_intervention.py --gpt2-version distilgpt2 --do-filter True --stat bls &&
python winogender_attn_intervention.py --gpt2-version distilgpt2 --do-filter False --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2 --do-filter True --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2 --do-filter False --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-medium --do-filter True --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-medium --do-filter False --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-large --do-filter True --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-large --do-filter False --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-xl --do-filter True --stat bls &&
python winogender_attn_intervention.py --gpt2-version gpt2-xl --do-filter False --stat bls &&
#
# Perform attention intervention using random model
#
python winogender_attn_intervention.py --gpt2-version gpt2 --do-filter True --stat bls --random-weights True