1. Download the preprocessed IDRIS documentation
git lfs install
git clone https://huggingface.co/datasets/CNRS-IDRIS/idris_doc_dataset
2. Clone the PieChat repository
git clone https://github.com/idriscnrs/PieChat.git
cd PieChat
3. Make your configuration file
Set the wright pathes, choose the devices, the models configurations...
config.ini
and config_sofi.ini
are examples of configuration files.
4. Create the Vector Database
Warning: A Vector Database is associated to a specific Embedding model. If you change the model, you need to recreate the VDB.
python -m piechat --config_file ./config.ini --make_vdb
5. Launch the PieChat server
python -m piechat --config_file ./config.ini
You need to use the following image to run PieChat with Sofi: cnrsidris/spellm:new
Then install the python libraries:
pip install langchain_huggingface
pip install langchain_chroma
pip install gradio_rag_sources
At this time, the P2P communication between GPUs is not set on Sofi. You need to disable it with NCCL_P2P_DISABLE=1
.
Also, if you want to use more than one GPU, you need to specify the CUDA_VISIBLE_DEVICES
environment variable.
Here is an example of command to launch PieChat with Sofi on 8 GPUs:
NCCL_P2P_DISABLE=1 CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m piechat --config_file ./config_sofi.ini