Welcome to the Instruction-Aware Contextual Compressor repository! This project is designed to compress context for RAG in LLM.
- Contextual Compression: Intelligently compresses data based on the context it is used in.
- Instruction-Aware: Adapts compression techniques based on the instructions provided.
To get started with the Instruction-Aware Contextual Compressor, follow these simple steps:
-
Clone the Repository
git clone https://github.com/howard-hou/instruction-aware-contextual-compressor.git
-
Install Dependencies Ensure you have Python installed, then run:
pip install -r requirement.txt
-
- Ensure to download the proper checkpoint: howard-hou/IACC-compressor-small
-
- Acquire the appropriate dataset via the provided link
- 3 Acquire the appropriate document collection via the provided line
-
- Run the following command to reproduce the results:
bash run_compress_dataset.sh
- Run the following command to reproduce the results:
weights and checkpoints are stored in the huggingface model hub.
If you find this project useful, please consider citing it:
@article{howard-hou2022instruction-aware-compressor,
title={Instruction-Aware Contextual Compressor},
author={Howard Hou},
journal={GitHub},
volume={1},
number={1},
pages={1-10},
year={2022},
publisher={GitHub}
}
This project is licensed under the Apache-2.0 License.