forked from PaddlePaddle/PaddleNLP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_index.sh
20 lines (20 loc) Β· 1.09 KB
/
create_index.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unset http_proxy && unset https_proxy
export CUDA_VISIBLE_DEVICES=0
# linux
python utils/offline_ann.py --index_name dureader_robust_query_encoder \
--doc_dir data/dureader_dev \
--query_embedding_model rocketqa-zh-nano-query-encoder \
--passage_embedding_model rocketqa-zh-nano-para-encoder \
--port 9200 \
--host localhost \
--embedding_dim 312 \
--delete_index
# windows & macos
# python utils/offline_ann.py --index_name dureader_robust_query_encoder \
# --doc_dir data/dureader_dev \
# --query_embedding_model rocketqa-zh-nano-query-encoder \
# --passage_embedding_model rocketqa-zh-nano-para-encoder \
# --port 9200 \
# --host host.docker.internal \
# --embedding_dim 312 \
# --delete_index