异常信息:
(Qwen2-VL) aaa@aaadeMacBook-Pro-2 Qwen2-VL % python web_demo_mm.py
/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/accelerate/utils/modeling.py:1462: UserWarning: Current model requires 939531344 bytes of buffer for offloaded layers, which seems does not fit any GPU's remaining memory. If you are experiencing a OOM later, please consider using offload_buffers=True.
warnings.warn(
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 179243.76it/s]
Traceback (most recent call last):
File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 297, in
main()
File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 292, in main
model, processor = _load_model_processor(args)
File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 61, in _load_model_processor
model = Qwen2VLForConditionalGeneration.from_pretrained(args.checkpoint_path, device_map=device_map)
File "/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4046, in from_pretrained
dispatch_model(model, **device_map_kwargs)
File "/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/accelerate/big_modeling.py", line 496, in dispatch_model
raise ValueError(
ValueError: You are trying to offload the whole model to the disk. Please use the disk_offload function instead.
版本:python3.10 系统:macos(m3) 为了使代码可以在M3运行,向下修改了两个包的版本。
异常信息: (Qwen2-VL) aaa@aaadeMacBook-Pro-2 Qwen2-VL % python web_demo_mm.py
main()
File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 292, in main
model, processor = _load_model_processor(args)
File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 61, in _load_model_processor
model = Qwen2VLForConditionalGeneration.from_pretrained(args.checkpoint_path, device_map=device_map)
File "/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4046, in from_pretrained
dispatch_model(model, **device_map_kwargs)
File "/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/accelerate/big_modeling.py", line 496, in dispatch_model
raise ValueError(
ValueError: You are trying to offload the whole model to the disk. Please use the
/opt/anaconda3/envs/Qwen2-VL/lib/python3.10/site-packages/accelerate/utils/modeling.py:1462: UserWarning: Current model requires 939531344 bytes of buffer for offloaded layers, which seems does not fit any GPU's remaining memory. If you are experiencing a OOM later, please consider using offload_buffers=True. warnings.warn( Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 179243.76it/s] Traceback (most recent call last): File "/Users/aaa/PycharmProjects/Qwen2-VL/web_demo_mm.py", line 297, in
disk_offload
function instead.