CHENBOT is a simple chatbot with knowledge and warmth.
First, clone the repository and navigate to the project directory:
git clone https://github.com/ccmoony/chatbot
cd chatbotThen, create a new conda environment and install the dependencies:
conda create -n chenbot python=3.10
conda activate chenbot
pip install -r requirements.txtDownload Qwen2.5-3B and put it in the root folder.
Make a new directory checkpoint and navigate to the sft directory
mkdir checkpoint
cd sftRun the following commands for instruction tuning using Alpaca-cleaned dataset:
python finetune.pyRun the following commands for instruction tuning using Alpaca-cleaned dataset with LoRA:
python finetune.py --use_loraRun the following commands to fine-tune the model with LoRA to imitate the tone of Zhen Huan:
python finetune.py --config config_huanhuan.yaml --style huanhuan --use_loraRun the following commands to fine-tune the model with LoRA to imitate the tone of Sun Wukong:
python finetune.py --config config_sunwukong.yaml --style wukong --use_loraYou can download our lora finetuned model from Here and put them in ../checkpoint folder.
Run the following commands to use RAG in chatbot:
python chat.py --retrievalRun the following commands to start the chatbot on terminal. Use the pretrained model or the full-parameter fine-tuned model:
python chat.py --model_path "your_model_path"Use the LoRA fine-tuned model:
python chat.py --model_path "your_model_path" --lora_path "your_lora_path"Use the Zhen Huan styled model:
python chat.py --model_path "your_model_path" --lora_path "zhenhuan_style_lora_path" --style huanhuanUse the Sun Wukong styled model:
python chat.py --model_path "your_model_path" --lora_path "wukong_style_lora_path" --style wukongRun the following command to start a Web UI demo(You may need to change the model path to your own path in demo.py):
python demo.pyThe demo below will open in a browser on http://localhost:7860

