|
Download README.md from Zixuan19/finetuning-data-generation: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/datasets/Zixuan19/finetuning-data-generation/resolve/main/README.md
- Command line
-
hf download hf://datasets/Zixuan19/finetuning-data-generation/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Zixuan19/finetuning-data-generation/resolve/main/README.md
1.07 kB
Guide to the code
1. Extract the data:
Please enter infoseek_image and WIT_image folder under the dataset folder and unzip the files inside seperately.
Then, please rearrange the folder as follows:
- Add an
infoseekfolder underdataset, and move the extractedimagefolder intoinfoseek - Move the extracted
M2KR_Imagesfolder intodataset - Then, you can delete the empty folder
The final dataset structure should be: /dataset/M2KR_Images/data/wit/image_data_train/images/9fcaeed86c292d3b159fc4f790738ff1.jpg /dataset/infoseek/image/oven_00712627.JPEG
2. Run the code
- Enter
src/construct_finetuning_dataset_10_instances_preflmr.py,- Change the
--root_pathparameter to the (for example, "/home/zixuan") - Change the
--tensor_parallel_sizeparameter to the number of gpu used, and adjustos.environ["CUDA_VISIBLE_DEVICES"] = "0,2,4,5"as needed.(If you have A100/H100 this code can be run on simply one gpu)
- Change the
- cd
srcand runconstruct_finetuning_dataset_10_instances_preflmr.py