Open guihonghao opened 3 months ago
拉一下最新的代码
需要安装最新的2.3.1版本吗?
main分支. 是使用了deepspeed zero3嘛
使用了deepspeed zero3
改成deepspeed zero2以后又报下面这种错误了。之前也提交了issue反应了这个问题。这种咋解决啊?
[INFO:swift] Loading the model using model_dir: /mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/lora_results/MiniCPM-V-2_6-cupai/checkpoint-80000-merged
Traceback (most recent call last):
File "/mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/ghh_swift/swift/examples/pytorch/llm/llm_sft.py", line 7, in <module>
output = sft_main()
File "/mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/ghh_swift/swift/swift/utils/run_utils.py", line 32, in x_main
result = llm_x(args, **kwargs)
File "/mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/ghh_swift/swift/swift/llm/sft.py", line 215, in llm_sft
model, tokenizer = get_model_tokenizer(
File "/mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/ghh_swift/swift/swift/llm/utils/model.py", line 6300, in get_model_tokenizer
model, tokenizer = get_function(model_dir, torch_dtype, model_kwargs, load_model, **kwargs)
File "/mnt/bn/arnold-ghh-test/mlx/users/guihonghao/playground/ghh_swift/swift/swift/llm/utils/model.py", line 5741, in get_model_tokenizer_minicpm_v_2_x
processor = AutoProcessor.from_pretrained(model_dir, trust_remote_code=True)
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/models/auto/processing_auto.py", line 310, in from_pretrained
return processor_class.from_pretrained(
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/processing_utils.py", line 465, in from_pretrained
args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/processing_utils.py", line 511, in _get_arguments_from_pretrained
args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 843, in from_pretrained
tokenizer_class = get_class_from_dynamic_module(class_ref, pretrained_model_name_or_path, **kwargs)
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/dynamic_module_utils.py", line 501, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module)
File "/home/tiger/.local/lib/python3.9/site-packages/transformers/dynamic_module_utils.py", line 202, in get_class_in_module
return getattr(module, class_name)
AttributeError: module 'transformers_modules.checkpoint-80000-merged.tokenization_minicpmv_fast' has no attribute 'MiniCPMVTokenizerFast'
你试试将模型文件夹改个名字
报下面的错误
使用下面的指令训练,$BASE_PATH/playground/lora_results/MiniCPM-V-2_6-cupai/checkpoint-80000-merged是通过infer中merge合并后的模型。