best_config.sh 12.1 KB
Newer Older
1
2
3
#To reproduce reported results on README, you can run the model with the following commands:

# for FB15k
4
# DistMult 1GPU
5
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset FB15k --batch_size 1024 \
6
    --neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.08 --batch_size_eval 16 \
7
8
    --valid --test -adv --gpu 0 --max_step 40000

9
10
11
# DistMult 8GPU
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset FB15k --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.08 --batch_size_eval 16 \
12
13
    --valid --test -adv --max_step 5000 --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --async_update --soft_rel_part --force_sync_interval 1000
14

15
# ComplEx 1GPU
16
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset FB15k --batch_size 1024 \
17
18
19
20
    --neg_sample_size 1024 --hidden_dim 400 --gamma 143.0 --lr 0.1 \
    --regularization_coef 2.00E-06 --batch_size_eval 16 --valid --test -adv --gpu 0 \
    --max_step 32000

21
22
# ComplEx 8GPU
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset FB15k --batch_size 1024 \
23
24
25
26
    --neg_sample_size 1024 --hidden_dim 400 --gamma 143.0 --lr 0.1 \
    --regularization_coef 2.00E-06 --batch_size_eval 16 --valid --test -adv \
    --max_step 4000 --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --soft_rel_part --force_sync_interval 1000
27

28
# TransE_l1 1GPU
29
DGLBACKEND=pytorch python3 train.py --model TransE_l1 --dataset FB15k --batch_size 1024 \
30
31
32
    --neg_sample_size 64 --regularization_coef 1e-07 --hidden_dim 400 --gamma 16.0 \
    --lr 0.01 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 48000

33
34
# TransE_l1 8GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l1 --dataset FB15k --batch_size 1024 \
35
36
37
38
    --neg_sample_size 64 --regularization_coef 1e-07 --hidden_dim 400 --gamma 16.0 \
    --lr 0.01 --batch_size_eval 16 --valid --test -adv --max_step 6000 --mix_cpu_gpu \
    --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update --soft_rel_part \
    --force_sync_interval 1000
39

40
# TransE_l2 1GPU
41
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset FB15k --batch_size 1024 \
42
43
44
45
46
47
48
49
50
    --neg_sample_size 256 --regularization_coef=1e-9 --hidden_dim 400 --gamma 19.9 \
    --lr 0.25 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 32000

# TransE_l2 8GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset FB15k --batch_size 1024 \
    --neg_sample_size 256 --regularization_coef=1e-9 --hidden_dim 400 --gamma 19.9 \
    --lr 0.25 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 4000 \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update --soft_rel_part \
    --force_sync_interval 1000
51

52
# RESCAL 1GPU
53
DGLBACKEND=pytorch python3 train.py --model RESCAL --dataset FB15k --batch_size 1024 \
54
55
56
57
58
59
60
61
    --neg_sample_size 256 --hidden_dim 500 --gamma 24.0 --lr 0.03 --batch_size_eval 16 \
    --gpu 0 --valid --test -adv --max_step 30000

# RESCAL 8GPU
DGLBACKEND=pytorch python3 train.py --model RESCAL --dataset FB15k --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 500 --gamma 24.0 --lr 0.03 --batch_size_eval 16 \
    --valid --test -adv --max_step 4000 --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --async_update --soft_rel_part --force_sync_interval 1000
62

63
# TransR 1GPU
64
DGLBACKEND=pytorch python3 train.py --model TransR --dataset FB15k --batch_size 1024 \
65
66
67
    --neg_sample_size 256 --regularization_coef 5e-8 --hidden_dim 200 --gamma 8.0 \
    --lr 0.015 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 32000

68
69
# TransR 8GPU
DGLBACKEND=pytorch python3 train.py --model TransR --dataset FB15k --batch_size 1024 \
70
71
72
73
    --neg_sample_size 256 --regularization_coef 5e-8 --hidden_dim 200 --gamma 8.0 \
    --lr 0.015 --batch_size_eval 16 --valid --test -adv --max_step 4000 --mix_cpu_gpu \
    --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update --soft_rel_part \
    --force_sync_interval 1000
74

75
76
# RotatE 1GPU
DGLBACKEND=pytorch python3 train.py --model RotatE --dataset FB15k --batch_size 2048 \
77
78
79
    --neg_sample_size 256 --regularization_coef 1e-07 --hidden_dim 200 --gamma 12.0 \
    --lr 0.009 --batch_size_eval 16 --valid --test -adv -de --max_step 20000 \
    --neg_deg_sample --gpu 0
80

81
# RotatE 8GPU
82
83
84
85
86
DGLBACKEND=pytorch python3 train.py --model RotatE --dataset FB15k --batch_size 1024 \
    --neg_sample_size 256 --regularization_coef 1e-07 --hidden_dim 200 --gamma 12.0 \
    --lr 0.009 --batch_size_eval 16 --valid --test -adv -de --max_step 2500 \
    --neg_deg_sample --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --soft_rel_part --force_sync_interval 1000
87

88
# for wn18
89
90
91
92
93
94
95
96
97
98
99
# DistMult 1GPU 
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset wn18 --batch_size 2048 \
    --neg_sample_size 128 --regularization_coef 1e-06 --hidden_dim 512 --gamma 20.0 \
    --lr 0.14 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 20000

# DistMult 8GPU 
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset wn18 --batch_size 2048 \
    --neg_sample_size 128 --regularization_coef 1e-06 --hidden_dim 512 --gamma 20.0 \
    --lr 0.14 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 2500 \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --force_sync_interval 1000
100

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# ComplEx 1GPU
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset wn18 --batch_size 1024 \
    --neg_sample_size 1024 --regularization_coef 0.00001 --hidden_dim 512 --gamma 200.0 \
    --lr 0.1 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 20000

# ComplEx 8GPU 
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset wn18 --batch_size 1024 \
    --neg_sample_size 1024 --regularization_coef 0.00001 --hidden_dim 512 --gamma 200.0 \
    --lr 0.1 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 2500 \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --force_sync_interval 1000

# TransE_l1 1GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l1 --dataset wn18 --batch_size 2048 \
    --neg_sample_size 128 --regularization_coef 2e-07 --hidden_dim 512 --gamma 12.0 \
    --lr 0.007 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 32000

# TransE_l1 8GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l1 --dataset wn18 --batch_size 2048 \
    --neg_sample_size 128 --regularization_coef 2e-07 --hidden_dim 512 --gamma 12.0 \
    --lr 0.007 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 4000 \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --force_sync_interval 1000

# TransE_l2 1GPU
126
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset wn18 --batch_size 1024 \
127
128
    --neg_sample_size 256 --regularization_coef 0.0000001 --hidden_dim 512 --gamma 6.0 \
    --lr 0.1 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 32000
129

130
131
132
133
134
135
# TransE_l2 8GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset wn18 --batch_size 1024 \
    --neg_sample_size 256 --regularization_coef 0.0000001 --hidden_dim 512 --gamma 6.0 \
    --lr 0.1 --batch_size_eval 16 --valid --test -adv --gpu 0 --max_step 4000 \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --force_sync_interval 1000
136

137
138
139
140
# RESCAL 1GPU
DGLBACKEND=pytorch python3 train.py --model RESCAL --dataset wn18 --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 250 --gamma 24.0 --lr 0.03 --batch_size_eval 16 \
    --valid --test -adv --gpu 0 --max_step 20000
Da Zheng's avatar
Da Zheng committed
141

142
# RESCAL 8GPU
143
DGLBACKEND=pytorch python3 train.py --model RESCAL --dataset wn18 --batch_size 1024 \
144
145
146
    --neg_sample_size 256 --hidden_dim 250 --gamma 24.0 --lr 0.03 --batch_size_eval 16 \
    --valid --test -adv --gpu 0 --max_step 2500  --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --async_update --force_sync_interval 1000 --soft_rel_part
147

148
# TransR 1GPU
149
DGLBACKEND=pytorch python3 train.py --model TransR --dataset wn18 --batch_size 1024 \
150
151
    --neg_sample_size 256 --hidden_dim 250 --gamma 16.0 --lr 0.1 --batch_size_eval 16 \
    --valid --test -adv --gpu 0 --max_step 30000
152

153
154
155
156
157
# TransR 8GPU
DGLBACKEND=pytorch python3 train.py --model TransR --dataset wn18 --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 250 --gamma 16.0 --lr 0.1 --batch_size_eval 16 \
    --valid --test -adv --max_step 2500  --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --async_update --force_sync_interval 1000 --soft_rel_part
158

159
160
161
162
163
# RotatE 1GPU
DGLBACKEND=pytorch python3 train.py --model RotatE --dataset wn18 --batch_size 2048 \
    --neg_sample_size 64 --regularization_coef 2e-07 --hidden_dim 256 --gamma 9.0 \
    --lr 0.0025 -de --batch_size_eval 16 --neg_deg_sample --valid --test -adv --gpu 0 \
    --max_step 24000 
Da Zheng's avatar
Da Zheng committed
164

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# RotatE 8GPU
DGLBACKEND=pytorch python3 train.py --model RotatE --dataset wn18 --batch_size 2048 \
    --neg_sample_size 64 --regularization_coef 2e-07 --hidden_dim 256 --gamma 9.0 \
    --lr 0.0025 -de --batch_size_eval 16 --neg_deg_sample --valid --test -adv \
    --max_step 3000 --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --async_update \
    --force_sync_interval 1000

# for Freebase multi-process-cpu
# TransE_l2
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset Freebase --batch_size 1000 \
    --neg_sample_size 200 --hidden_dim 400 --gamma 10 --lr 0.1 --max_step 50000 \
    --log_interval 100 --batch_size_eval 1000 --neg_sample_size_eval 1000 --test -adv \
    --regularization_coef 1e-9 --num_thread 1 --num_proc 48

# DistMult
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset Freebase --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.08 --max_step 50000 \
    --log_interval 100 --batch_size_eval 1000 --neg_sample_size_eval 1000 --test -adv \
    --num_thread 1 --num_proc 48

# ComplEx
Da Zheng's avatar
Da Zheng committed
186
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset Freebase --batch_size 1024 \
187
188
189
    --neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.1 --max_step 50000 \
    --log_interval 100 --batch_size_eval 1000 --neg_sample_size_eval 1000 --test -adv \
    --num_thread 1 --num_proc 48
190
191

# Freebase multi-gpu
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# TransE_l2 8GPU
DGLBACKEND=pytorch python3 train.py --model TransE_l2 --dataset Freebase --batch_size 1000 \
    --neg_sample_size 200 --hidden_dim 400 --gamma 10 --lr 0.1 --regularization_coef 1e-9 \
    --batch_size_eval 1000 --valid --test -adv --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --max_step 320000 --neg_sample_size_eval 1000 --eval_interval \
    100000 --log_interval 10000 --async_update --soft_rel_part --force_sync_interval 10000

# DistMult 8GPU
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset Freebase --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.08 --batch_size_eval 1000 \
    --valid --test -adv --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --max_step 300000 \
    --neg_sample_size_eval 1000 --eval_interval 100000 --log_interval 10000 --async_update \
    --soft_rel_part --force_sync_interval 10000

# ComplEx 8GPU
DGLBACKEND=pytorch python3 train.py --model ComplEx --dataset Freebase --batch_size 1024 \
    --neg_sample_size 256 --hidden_dim 400 --gamma 143 --lr 0.1 \
    --regularization_coef 2.00E-06 --batch_size_eval 1000 --valid --test -adv \
    --mix_cpu_gpu --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --max_step 360000 \
    --neg_sample_size_eval 1000 --eval_interval 100000 --log_interval 10000 \
    --async_update --soft_rel_part --force_sync_interval 10000

# TransR 8GPU
DGLBACKEND=pytorch python3 train.py --model TransR --dataset Freebase --batch_size 1024 \
    --neg_sample_size 256 --regularization_coef 5e-8 --hidden_dim 200 --gamma 8.0 \
    --lr 0.015 --batch_size_eval 1000 --valid --test -adv --mix_cpu_gpu --num_proc 8 \
    --gpu 0 1 2 3 4 5 6 7 --max_step 300000 --neg_sample_size_eval 1000 \
    --eval_interval 100000 --log_interval 10000 --async_update --soft_rel_part \
    --force_sync_interval 10000

# RotatE 8GPU
DGLBACKEND=pytorch python3 train.py --model RotatE --dataset Freebase --batch_size 1024 \
    --neg_sample_size 256 -de --hidden_dim 200 --gamma 12.0 --lr 0.01 \
    --regularization_coef 1e-7 --batch_size_eval 1000 --valid --test -adv --mix_cpu_gpu \
    --num_proc 8 --gpu 0 1 2 3 4 5 6 7 --max_step 300000 --neg_sample_size_eval 1000 \
    --eval_interval 100000 --log_interval 10000 --async_update --soft_rel_part \
    --force_sync_interval 10000