Skip to content

AI4fun/DQ-LoRe

Repository files navigation

DQ-LoRe

Open Source Code for 'DQ-LoRe: Dual Queries with Low Rank Approximation Re-ranking for In-Context Learning' Accepted by ICLR 2024 (Poster) image

The code framework has been modified based on CEIL , and we are very grateful for their previous work.

Setup

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`.

Easy start

nohup sh script/run_DQ-LoRe.sh > result.out 2>&1 &

If you wish to examine the results obtained using different CoTs, you may employ the following.

python prompt_inferencer.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages