The main fine-tuning script is written in a general format that would require you to provide a jsonl
file for train and test datasets in addition to a json file listing the special tokens used in your dataset.
For example each row in your dataset might be formated like the following:
{"input": "<ASSISTANT>How can I help you?</ASSISTANT><USER>how is the weather?</USER>"}
And the special tokens can be:
{"tokens": ["<ASSISTANT>", "</ASSISTANT>", "<USER>", "</USER>"]}
python create_dataset.py
convert llama weights to transformers weights and upload to huggingface
convert_llama_weights_to_hf.py
python convert_llama_weights_to_hf.py \
--input_dir /home/work/virtual-venv/lora-env/data/Llama2 \
--model_size 7B \
--output_dir /home/work/virtual-venv/lora-env/data/llama2-chat-hf
python qlora_finetuning.py
#nohup python qlora_finetuning.py 2>/tmp/llama2-lora.log 1>&2 &
fine tuning result: conghao/llama2-qlora-finetuning
python inference_llama2.py