forked from luyug/Reranker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jobscript-reranker-run-train
65 lines (51 loc) · 1.35 KB
/
jobscript-reranker-run-train
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# set a job name
#SBATCH --job-name=reranker
#################
# a file for job output, you can check job progress
#SBATCH --output=reranker_slurm_output_%j.out
#################
# a file for errors
#SBATCH --error=reranker_slurm_output_%j.err
#################
# time needed for job
#SBATCH --time=00:30:00
#################
# gpus per node
#SBATCH --gres=gpu:1
#################
# cpus per job
#SBATCH --cpus-per-task=1
#################
# number of requested nodes
#SBATCH --nodes=1
#################
# memory per node
#SBATCH --mem=8GB
#################
# slurm will send a signal this far out before it kills the job
#SBATCH --signal=USR1@300
#################
# tasks per node
#SBATCH --tasks-per-node=1
#################
module load cuda
#module load tensorflow/2.5.0-py39-cuda112
source venv/bin/activate
srun python3 run_agask.py \
--save_steps 2000 \
--max_len 512 \
--cache_dir cache\
--per_device_train_batch_size 2 \
--train_group_size 2 \
--gradient_accumulation_steps 2 \
--weight_decay 0.01 \
--learning_rate 1e-6 \
--num_train_epochs 10 \
--dataloader_num_workers 8 \
--fp16 \
--do_train \
--output_dir examples/agask/models/agask_model_custom_params_queries \
--model_name_or_path /scratch1/koo01a/pt-bert-large-msmarco \
--train_dir examples/agask/feature_json \
--overwrite_output_dir