diff --git a/PrepareVicuna.md b/PrepareVicuna.md index 0585e62ff..b18cfd893 100644 --- a/PrepareVicuna.md +++ b/PrepareVicuna.md @@ -28,7 +28,7 @@ pip install git+https://github.com/lm-sys/FastChat.git@v0.1.10 Then, run the following command to create the final working weight ``` -python -m fastchat.model.apply_delta --base /path/to/llama-13bOR7b-hf/ --target /path/to/save/working/vicuna/weight/ --delta /path/to/vicuna-13bOR7b-delta-v0/ +python -m fastchat.model.apply_delta --base /absolute/path/to/llama-13bOR7b-hf/ --target /absolute/path/to/save/working/vicuna/weight/ --delta /absolute/path/to/vicuna-13bOR7b-delta-v0/ ``` Now you are good to go! diff --git a/README.md b/README.md index 02bc50441..271aa5b59 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ Download the corresponding LLM weights from the following huggingface space via [Downlad](https://huggingface.co/Vision-CAIR/vicuna/tree/main) | [Download](https://huggingface.co/Vision-CAIR/vicuna-7b/tree/main) | [Download](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/tree/main) -Then, set the path to the vicuna weight in the model config file +Then, set the absolute path to the vicuna weight in the model config file [here](minigpt4/configs/models/minigpt4_vicuna0.yaml#L18) at Line 18 -and/or the path to the llama2 weight in the model config file +and/or the absolute path to the llama2 weight in the model config file [here](minigpt4/configs/models/minigpt4_llama2.yaml#L15) at Line 15. **3. Prepare the pretrained MiniGPT-4 checkpoint** @@ -78,7 +78,7 @@ Download the pretrained checkpoints according to the Vicuna model you prepare. [Downlad](https://drive.google.com/file/d/1a4zLvaiDBr-36pasffmgpvH5P7CKmpze/view?usp=share_link) | [Download](https://drive.google.com/file/d/1RY9jV0dyqLX-o38LrumkKRh6Jtaop58R/view?usp=sharing) | [Download](https://drive.google.com/file/d/11nAPjEok8eAGGEG1N2vXo3kBLCg0WgUk/view?usp=sharing) -Then, set the path to the pretrained checkpoint in the evaluation config file +Then, set the absolute path to the pretrained checkpoint in the evaluation config file in [eval_configs/minigpt4_eval.yaml](eval_configs/minigpt4_eval.yaml#L10) at Line 8 for Vicuna version or [eval_configs/minigpt4_llama2_eval.yaml](eval_configs/minigpt4_llama2_eval.yaml#L10) for LLama2 version. @@ -118,7 +118,7 @@ our [first stage dataset preparation instruction](dataset/README_1_STAGE.md). After the first stage, the visual features are mapped and can be understood by the language model. To launch the first stage training, run the following command. In our experiments, we use 4 A100. -You can change the save path in the config file +You can change the relative save path in the config file [train_configs/minigpt4_stage1_pretrain.yaml](train_configs/minigpt4_stage1_pretrain.yaml) ```bash @@ -137,9 +137,9 @@ and convert it to a conversation format to further align MiniGPT-4. To download and prepare our second stage dataset, please check our [second stage dataset preparation instruction](dataset/README_2_STAGE.md). To launch the second stage alignment, -first specify the path to the checkpoint file trained in stage 1 in +first specify the absolute path to the checkpoint file trained in stage 1 in [train_configs/minigpt4_stage1_pretrain.yaml](train_configs/minigpt4_stage2_finetune.yaml). -You can also specify the output path there. +You can also specify the relative output path there. Then, run the following command. In our experiments, we use 1 A100. ```bash diff --git a/dataset/README_1_STAGE.md b/dataset/README_1_STAGE.md index 47ffaaef6..dfe451651 100644 --- a/dataset/README_1_STAGE.md +++ b/dataset/README_1_STAGE.md @@ -21,7 +21,7 @@ laion_synthetic_filtered_large.json ### setup the dataset folder and move the annotation file to the data storage folder ``` -export MINIGPT4_DATASET=/YOUR/PATH/FOR/LARGE/DATASET/ +export MINIGPT4_DATASET=/YOUR/ABSOLUTE/PATH/FOR/LARGE/DATASET/ mkdir ${MINIGPT4_DATASET}/cc_sbu mkdir ${MINIGPT4_DATASET}/laion mv ccs_synthetic_filtered_large.json ${MINIGPT4_DATASET}/cc_sbu @@ -84,11 +84,11 @@ The final dataset structure ## Set up the dataset configuration files -Then, set up the LAION dataset loading path in +Then, set up the absolute LAION dataset loading path in [here](../minigpt4/configs/datasets/laion/defaults.yaml#L5) at Line 5 as ${MINIGPT4_DATASET}/laion/laion_dataset/{00000..10488}.tar -and the Conceptual Captoin and SBU datasets loading path in +and the absolute Conceptual Captoin and SBU datasets loading path in [here](../minigpt4/configs/datasets/cc_sbu/defaults.yaml#L5) at Line 5 as ${MINIGPT4_DATASET}/cc_sbu/cc_sbu_dataset/{00000..01255}.tar diff --git a/dataset/README_2_STAGE.md b/dataset/README_2_STAGE.md index b826765fe..e2e389326 100644 --- a/dataset/README_2_STAGE.md +++ b/dataset/README_2_STAGE.md @@ -14,6 +14,6 @@ cc_sbu_align ``` Put the folder to any path you want. -Then, set up the dataset path in the dataset config file +Then, set up the absolute dataset path in the dataset config file [here](../minigpt4/configs/datasets/cc_sbu/align.yaml#L5) at Line 5. diff --git a/eval_configs/minigpt4_llama2_eval.yaml b/eval_configs/minigpt4_llama2_eval.yaml index eea99d3bf..284019c93 100644 --- a/eval_configs/minigpt4_llama2_eval.yaml +++ b/eval_configs/minigpt4_llama2_eval.yaml @@ -5,7 +5,7 @@ model: end_sym: "" low_resource: True prompt_template: '[INST] {} [/INST] ' - ckpt: '/path/to/checkpoint/' + ckpt: '/absolute/path/to/checkpoint/' datasets: diff --git a/minigpt4/configs/datasets/cc_sbu/align.yaml b/minigpt4/configs/datasets/cc_sbu/align.yaml index 571083420..7f343946c 100644 --- a/minigpt4/configs/datasets/cc_sbu/align.yaml +++ b/minigpt4/configs/datasets/cc_sbu/align.yaml @@ -2,4 +2,4 @@ datasets: cc_sbu_align: data_type: images build_info: - storage: /path/to/cc_sbu_align/ + storage: /absolute/path/to/cc_sbu_align/ diff --git a/minigpt4/configs/datasets/cc_sbu/defaults.yaml b/minigpt4/configs/datasets/cc_sbu/defaults.yaml index 60390eece..d159ada23 100644 --- a/minigpt4/configs/datasets/cc_sbu/defaults.yaml +++ b/minigpt4/configs/datasets/cc_sbu/defaults.yaml @@ -2,4 +2,4 @@ datasets: cc_sbu: data_type: images build_info: - storage: /path/to/cc_sbu_dataset/{00000..01255}.tar + storage: /absolute/path/to/cc_sbu_dataset/{00000..01255}.tar diff --git a/minigpt4/configs/datasets/laion/defaults.yaml b/minigpt4/configs/datasets/laion/defaults.yaml index 6bad62901..fcf51b361 100644 --- a/minigpt4/configs/datasets/laion/defaults.yaml +++ b/minigpt4/configs/datasets/laion/defaults.yaml @@ -2,4 +2,4 @@ datasets: laion: data_type: images build_info: - storage: /path/to/laion_dataset/{00000..10488}.tar + storage: /absolute/path/to/laion_dataset/{00000..10488}.tar diff --git a/minigpt4/configs/models/minigpt4_llama2.yaml b/minigpt4/configs/models/minigpt4_llama2.yaml index c201bdcc8..19115b47e 100644 --- a/minigpt4/configs/models/minigpt4_llama2.yaml +++ b/minigpt4/configs/models/minigpt4_llama2.yaml @@ -12,7 +12,7 @@ model: # generation configs prompt: "" - llama_model: "/path/to/llama2/weight" + llama_model: "/absolute/path/to/llama2/weight" preprocess: vis_processor: diff --git a/minigpt4/configs/models/minigpt4_vicuna0.yaml b/minigpt4/configs/models/minigpt4_vicuna0.yaml index 34bd2ed30..e94cee074 100644 --- a/minigpt4/configs/models/minigpt4_vicuna0.yaml +++ b/minigpt4/configs/models/minigpt4_vicuna0.yaml @@ -15,7 +15,7 @@ model: # generation configs prompt: "" - llama_model: "/path/to/vicuna/weight" + llama_model: "/absolute/path/to/vicuna/weight" preprocess: vis_processor: diff --git a/train_configs/minigpt4_llama2_stage2_finetune.yaml b/train_configs/minigpt4_llama2_stage2_finetune.yaml index 9a6ac2d96..992315422 100644 --- a/train_configs/minigpt4_llama2_stage2_finetune.yaml +++ b/train_configs/minigpt4_llama2_stage2_finetune.yaml @@ -6,7 +6,7 @@ model: end_sym: "" prompt_path: "prompts/alignment.txt" prompt_template: '[INST] {} [/INST] ' - ckpt: '/path/to/stage1/checkpoint/' + ckpt: '/absolute/path/to/stage1/checkpoint/' datasets: diff --git a/train_configs/minigpt4_stage2_finetune.yaml b/train_configs/minigpt4_stage2_finetune.yaml index 54cedb46d..9046f3159 100644 --- a/train_configs/minigpt4_stage2_finetune.yaml +++ b/train_configs/minigpt4_stage2_finetune.yaml @@ -6,7 +6,7 @@ model: end_sym: "###" prompt_path: "prompts/alignment.txt" prompt_template: '###Human: {} ###Assistant: ' - ckpt: '/path/to/stage1/checkpoint/' + ckpt: '/absolute/path/to/stage1/checkpoint/' datasets: