IR_Project / Retriever /bash_gen.sh
Lk123's picture
Upload 18 files
83c2bac verified
raw
history blame contribute delete
447 Bytes
#!/bin/bash
export CUDA_VISIBLE_DEVICES=0
TSV_FILE="../corpus/wiki_webq_corpus.tsv" # wiki语料库
OUTPUT_FILE="../corpus/ctx_embeddings.pkl" # 语料库embedding
BATCH_SIZE=128
MODEL_NAME="facebook/dpr-ctx_encoder-multiset-base" # 模型
DEVICE="cuda"
python gen_embedding.py \
--tsv_file $TSV_FILE \
--output_file $OUTPUT_FILE \
--batch_size $BATCH_SIZE \
--model_name $MODEL_NAME \
--insert_title \
--device $DEVICE