-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_listwise.sh
More file actions
37 lines (32 loc) · 1022 Bytes
/
run_listwise.sh
File metadata and controls
37 lines (32 loc) · 1022 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
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -euo pipefail
# common args
HF_MODEL="meta-llama/Llama-3.1-8B-Instruct" # (chat/instruct tends to parse better)
HF_ADAPTER="abdoelsayed/dear-8b-reranker-listwise-lora-v1"
IN_DIR="./results/dear-8b-reranker-ce-lora-v1"
OUT_DIR="./results/dear-8b-reranker-ce-lora-v1"
# the datasets you looped over
DATASETS=(covid) #dl19 dl20 news nfc touche scifact signal robust04 dbpedia
mkdir -p "${OUT_DIR}"
for ds in "${DATASETS[@]}"; do
in_json="${IN_DIR}/ranked_${ds}.json"
out_path="${OUT_DIR}/${ds}-dear8b"
echo "=== Running ${ds} ==="
python -m listwise_rerank.main \
--input_json "${in_json}" \
--out_dir "${out_path}" \
--dataset_key "${ds}" \
--client hf \
--hf_model "${HF_MODEL}" \
--hf_adapter "${HF_ADAPTER}" \
--hf_adapter_strategy auto \
--hf_dtype bfloat16 \
--hf_device auto \
--rank_start 0 \
--rank_end 30 \
--window_size 20 \
--step 10 \
--temperature 0.5 \
--max_new_tokens 1024 \
--max_passage_tokens 300
done