swift
swift copied to clipboard
有关Internvl-1.5的微调实验(AttributeError: 'NoneType' object has no attribute 'shape')
@hjh0119 在1.5版本微调训练结束后,按照教程里面的推理命令,并加载了本地的权重,我使用的infer命令如下:
CUDA_VISIBLE_DEVICES=0,1 swift infer --ckpt_dir output/internvl-chat-v1_5/v0-20240512-191616/checkpoint-25 --load_dataset_config true --dtype bf16 --model_id_or_path xxxxx/InternVL/pretrained/InternVL-Chat-V1-5
但在加载后出现了报错情况,不知之前测试时有没有发生
Traceback (most recent call last):
File "/data2/renyw/PythonWorkspace/FM-LLM/swift/swift/cli/infer.py", line 5, in <module>
infer_main()
File "/data2/renyw/PythonWorkspace/FM-LLM/swift/swift/utils/run_utils.py", line 27, in x_main
result = llm_x(args, **kwargs)
File "/data2/renyw/PythonWorkspace/FM-LLM/swift/swift/llm/infer.py", line 376, in llm_infer
if args.show_dataset_sample >= 0 and val_dataset.shape[0] > args.show_dataset_sample:
AttributeError: 'NoneType' object has no attribute 'shape'