⚠️ How To install Requirements
Run the following code on your terminal.
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
chmod +x cuda_11.8.0_520.61.05_linux.run
sh cuda_11.8.0_520.61.05_linux.run
Input accept
to proceed.
Select the driver and install.
Run the following commands on your terminal.
$ export PATH=/usr/local/cuda-11.8/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
$ pip install -r requirements.txt
LLM (Large Language Model)
Before training, place Legal QA data at following directory
model/LLM/train/data
model/LLM/train/val_data
HuggingFace Write Token should be filled at line #38 of the following file
Run the following command on your terminal
$ python3 model/LLM/train/train.py
Question Filterering Model (Koelectra)
$ python3 model/Filter/train.py
LLM (Large Language Model)
peft model id should be changed after training at line #27 of the following file
Run the following command on your terminal
$ python3 model/LLM/inference/infer.py
Before training, place Legal QA data at following directory
model/Retrieval/bert_retrieval/data
Run the following command on your terminal
$ python3 model/Retrieval/bert_retrieval/retrieval_main.py
Before training, place Legal QA data at following directory
model/Retrieval/bm25_retrieval/all_data
Run the following command on your terminal
$ python3 model/Retrieval/bm25_retrieval/retrieval_main.py
Question Filtering Model (Koelectra)
Run the following command on your terminal
$ python3 model/Filter/infer.py
LLM (Large Language Model)
model name and use
parmater should be changed if needed
Run the following command on your terminal
$ python3 model/LLM/evaluation/evaluate_metrics.py