-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathembed_sbatch.sh
More file actions
executable file
·27 lines (20 loc) · 910 Bytes
/
embed_sbatch.sh
File metadata and controls
executable file
·27 lines (20 loc) · 910 Bytes
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
#!/bin/bash
#SBATCH --account=Project_2000539
#SBATCH --time=24:00:00
##SBATCH --time=00:15:00
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=6G
#SBATCH --partition=gpu
#SBATCH --gres=gpu:v100:1,nvme:10
#SBATCH --cpus-per-task=4
#module load python-data/3.7.6-1
#source /projappl/project_2000539/faiss_distractors/venv-faissgpu/bin/activate
module load pytorch/1.11
#export TMPDIR=$LOCAL_SCRATCH
export PYTORCH_PRETRAINED_BERT_CACHE=$TMPDIR
PART=$1
PARTS=$2
DATAIN=$3 ## some .gz with sentences
DATAOUT=$4 ## where to store the embedded vectors
#zcat $DATAIN | python3 embed.py --thisjob $PART --jobs $PARTS --bert-model TurkuNLP/bert-base-finnish-cased-v1 --out $DATAOUT
python3 embed_sbert.py --thisjob $PART --jobs $PARTS --in-file $DATAIN --bert-tokenizer sentence-transformers/paraphrase-multilingual-mpnet-base-v2 --sbert-model sentence-transformers/paraphrase-multilingual-mpnet-base-v2 --out $DATAOUT