Closed Minami-su closed 10 months ago
您好 您修改一下lavis/config/datasets里的两个数据集配置的yaml文件的storage,输入绝对路径或者相对cache目录的相对路径(最好按照readme的目录树调整一下你的路径)
---- Replied Message ---- From @.> Date 11/11/2023 14:11 To Coobiw/MiniGPT4Qwen @.> Cc Subscribed @.***> Subject [Coobiw/MiniGPT4Qwen] ValueError: unknown url type: '/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json' (Issue #3)
@.:~/autodl-tmp/MiniGPT4Qwen-master# CUDA_VISIBLE_DEVICES=0 python train.py --cfg-path lavis/projects/instruction_tuning/train.yaml Not using distributed mode 2023-11-11 14:10:55,477 [INFO] ===== Running Parameters ===== 2023-11-11 14:10:55,478 [INFO] { "accum_grad_iters": 16, "amp": false, "batch_size_eval": 1, "batch_size_train": 1, "device": "cuda", "dist_url": "env://", "distributed": false, "evaluate": false, "grad_norm_clip": 1.0, "init_lr": 0.0001, "lr_sched": "linear_warmup_cosine_lr", "max_epoch": 10, "min_lr": 1e-06, "num_workers": 4, "output_dir": "output/instruction_tuning/lr1e-4", "resume_ckpt_path": null, "seed": 42, "task": "image_text_pretrain", "train_splits": [ "train" ], "warmup_lr": 0, "warmup_steps": 500, "weight_decay": 0.05, "world_size": 1 } 2023-11-11 14:10:55,478 [INFO] ====== Dataset Attributes ====== 2023-11-11 14:10:55,478 [INFO] ======== minigpt4_instruction ======= 2023-11-11 14:10:55,479 [INFO] { "build_info": { "annotations": { "train": { "storage": "dataset/minigpt4/minigpt4_minigpt4qwen_format.json", "url": "/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json" } }, "images": { "storage": "dataset/minigpt4/image" } }, "data_type": "images", "text_processor": { "train": { "max_words": 100, "name": "base_instruction" } }, "vis_processor": { "train": { "image_size": 224, "name": "blip2_image_train" } } } 2023-11-11 14:10:55,479 [INFO] ======== llava_instruction ======= 2023-11-11 14:10:55,479 [INFO] { "build_info": { "annotations": { "train": { "storage": "dataset/llava/llava_minigpt4qwen_format.json", "url": "/export/dataset/llava/llava_minigpt4qwen_format.json" } }, "images": { "storage": "dataset/llava/image" } }, "data_type": "images", "text_processor": { "train": { "max_words": 100, "name": "base_instruction" } }, "vis_processor": { "train": { "image_size": 224, "name": "blip2_image_train" } } } 2023-11-11 14:10:55,479 [INFO] ====== Model Attributes ====== 2023-11-11 14:10:55,480 [INFO] { "arch": "minigpt4qwen", "autocast_dtype": "bfloat16", "drop_path_rate": 0, "finetuned": "", "freeze_proj": false, "freeze_qformer": true, "freeze_queries": true, "freeze_vit": true, "get_lora": false, "image_size": 224, "llm_model": "ckpt/qwen_14b_xiaoyu", "load_finetuned": false, "load_pretrained": true, "lora_alpha": 32, "lora_dropout": 0.05, "lora_r": 8, "max_txt_len": 256, "model_type": "qwen7b_chat", "num_query_token": 32, "pretrained": "ckpt/blip2/blip2_pretrained_flant5xxl.pth", "qformer_text_input": false, "unfreeze_pos_embed": false, "use_grad_checkpoint": true, "vit_model": "eva_clip_g", "vit_precision": "fp16" } /export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json Traceback (most recent call last): File "train.py", line 103, in main() File "train.py", line 93, in main datasets = task.build_datasets(cfg) File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/tasks/base_task.py", line 57, in build_datasets dataset = builder.build_datasets() File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 52, in build_datasets self._download_data() File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 99, in _download_data self._download_ann() File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 157, in _download_ann download_url(url=url_or_filename, root=dirname, filename=filename) File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 134, in download_url url = _get_redirect_url(url, max_hops=max_redirect_hops) File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 82, in _get_redirect_url with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response: File "/root/miniconda3/lib/python3.8/urllib/request.py", line 328, in init self.full_url = url File "/root/miniconda3/lib/python3.8/urllib/request.py", line 354, in full_url self._parse() File "/root/miniconda3/lib/python3.8/urllib/request.py", line 383, in _parse raise ValueError("unknown url type: %r" % self.full_url) ValueError: unknown url type: '/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json' — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>
x谢谢,问题解决了,顺便我会尝试一下将llm量化到4bit训练,这样单卡就可以训练百亿模型
嗯嗯 用gptq可以
---- Replied Message ---- From @.> Date 11/11/2023 14:46 To Coobiw/MiniGPT4Qwen @.> Cc Coobiw @.>, Comment @.> Subject Re: [Coobiw/MiniGPT4Qwen] ValueError: unknown url type: '/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json' (Issue #3)
x谢谢,问题解决了,顺便我会尝试一下将llm量化到4bit训练,这样单卡就可以训练百亿模型 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
root@autodl-container-809011af9e-f140ab75:~/autodl-tmp/MiniGPT4Qwen-master# CUDA_VISIBLE_DEVICES=0 python train.py --cfg-path lavis/projects/instruction_tuning/train.yaml Not using distributed mode 2023-11-11 14:10:55,477 [INFO] ===== Running Parameters ===== 2023-11-11 14:10:55,478 [INFO] { "accum_grad_iters": 16, "amp": false, "batch_size_eval": 1, "batch_size_train": 1, "device": "cuda", "dist_url": "env://", "distributed": false, "evaluate": false, "grad_norm_clip": 1.0, "init_lr": 0.0001, "lr_sched": "linear_warmup_cosine_lr", "max_epoch": 10, "min_lr": 1e-06, "num_workers": 4, "output_dir": "output/instruction_tuning/lr1e-4", "resume_ckpt_path": null, "seed": 42, "task": "image_text_pretrain", "train_splits": [ "train" ], "warmup_lr": 0, "warmup_steps": 500, "weight_decay": 0.05, "world_size": 1 } 2023-11-11 14:10:55,478 [INFO] ====== Dataset Attributes ====== 2023-11-11 14:10:55,478 [INFO] ======== minigpt4_instruction ======= 2023-11-11 14:10:55,479 [INFO] { "build_info": { "annotations": { "train": { "storage": "dataset/minigpt4/minigpt4_minigpt4qwen_format.json", "url": "/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json" } }, "images": { "storage": "dataset/minigpt4/image" } }, "data_type": "images", "text_processor": { "train": { "max_words": 100, "name": "base_instruction" } }, "vis_processor": { "train": { "image_size": 224, "name": "blip2_image_train" } } } 2023-11-11 14:10:55,479 [INFO] ======== llava_instruction ======= 2023-11-11 14:10:55,479 [INFO] { "build_info": { "annotations": { "train": { "storage": "dataset/llava/llava_minigpt4qwen_format.json", "url": "/export/dataset/llava/llava_minigpt4qwen_format.json" } }, "images": { "storage": "dataset/llava/image" } }, "data_type": "images", "text_processor": { "train": { "max_words": 100, "name": "base_instruction" } }, "vis_processor": { "train": { "image_size": 224, "name": "blip2_image_train" } } } 2023-11-11 14:10:55,479 [INFO] ====== Model Attributes ====== 2023-11-11 14:10:55,480 [INFO] { "arch": "minigpt4qwen", "autocast_dtype": "bfloat16", "drop_path_rate": 0, "finetuned": "", "freeze_proj": false, "freeze_qformer": true, "freeze_queries": true, "freeze_vit": true, "get_lora": false, "image_size": 224, "llm_model": "ckpt/qwen_14b_xiaoyu", "load_finetuned": false, "load_pretrained": true, "lora_alpha": 32, "lora_dropout": 0.05, "lora_r": 8, "max_txt_len": 256, "model_type": "qwen7b_chat", "num_query_token": 32, "pretrained": "ckpt/blip2/blip2_pretrained_flant5xxl.pth", "qformer_text_input": false, "unfreeze_pos_embed": false, "use_grad_checkpoint": true, "vit_model": "eva_clip_g", "vit_precision": "fp16" } /export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json Traceback (most recent call last): File "train.py", line 103, in
main()
File "train.py", line 93, in main
datasets = task.build_datasets(cfg)
File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/tasks/base_task.py", line 57, in build_datasets
dataset = builder.build_datasets()
File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 52, in build_datasets
self._download_data()
File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 99, in _download_data
self._download_ann()
File "/root/autodl-tmp/MiniGPT4Qwen-master/lavis/datasets/builders/base_dataset_builder.py", line 157, in _download_ann
download_url(url=url_or_filename, root=dirname, filename=filename)
File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 134, in download_url
url = _get_redirect_url(url, max_hops=max_redirect_hops)
File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 82, in _get_redirect_url
with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response:
File "/root/miniconda3/lib/python3.8/urllib/request.py", line 328, in init
self.full_url = url
File "/root/miniconda3/lib/python3.8/urllib/request.py", line 354, in full_url
self._parse()
File "/root/miniconda3/lib/python3.8/urllib/request.py", line 383, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/export/dataset/minigpt4/minigpt4_minigpt4qwen_format.json'