Open Source Code for 'DQ-LoRe: Dual Queries with Low Rank Approximation Re-ranking for In-Context Learning' Accepted by ICLR 2024 (Poster)
The code framework has been modified based on CEIL , and we are very grateful for their previous work.
All required packages can be found in requirements.txt
.
You can install them in a new environment with
conda create -n icl python=3.7
conda activate icl
git clone https://github.com/AI4fun/DQ-LoRe.git
# The following line to be replaced depending on your cuda version.
pip install torch==1.10.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
cd DQ-LoRe
pip install -r requirements.txt
# if you don't want to use API from openai, just comment out the `openai` package in `requirements.txt`.
nohup sh script/run_DQ-LoRe.sh > result.out 2>&1 &
python prompt_inferencer.py