modelscope / ms-swift

Use PEFT or Full-parameter to finetune 400+ LLMs or 100+ MLLMs. (LLM: Qwen2.5, Llama3.2, GLM4, Internlm2.5, Yi1.5, Mistral, Baichuan2, DeepSeek, Gemma2, ...; MLLM: Qwen2-VL, Qwen2-Audio, Llama3.2-Vision, Llava, InternVL2, MiniCPM-V-2.6, GLM4v, Xcomposer2.5, Yi-VL, DeepSeek-VL, Phi3.5-Vision, ...)
https://swift.readthedocs.io/zh-cn/latest/Instruction/index.html
Apache License 2.0
4.14k stars 367 forks source link

File request for Molmo series #2412

Open JHL328 opened 2 hours ago

JHL328 commented 2 hours ago

请问是否有molmo系列最佳实践文档?

JHL328 commented 2 hours ago

在对molmo进行infer的时候,出现如下报错 [INFO:swift] Please enter the conversation content first, followed by the path to the multimedia file. <<< who are you Exception in thread Thread-2 (_model_generate): Traceback (most recent call last): File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/mbz/users/haolong.jia/AICI/ms-swift/swift/llm/utils/utils.py", line 749, in _model_generate res = model.generate(*args, *kwargs) File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(args, kwargs) File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/transformers/generation/utils.py", line 2215, in generate result = self._sample( File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/transformers/generation/utils.py", line 3206, in _sample outputs = self(model_inputs, return_dict=True) File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(args, kwargs) File "/mbz/users/haolong.jia/miniconda3/envs/swift/lib/python3.10/site-packages/accelerate/hooks.py", line 170, in new_forward output = module._old_forward(*args, **kwargs) File "/mbz/users/haolong.jia/.cache/huggingface/modules/transformers_modules/Molmo-7B-D-0924/modeling_molmo.py", line 2106, in forward outputs = self.model.forward( File "/mbz/users/haolong.jia/AICI/ms-swift/swift/llm/utils/model.py", line 1446, in _forward kwargs['append_last_valid_logits'] = kwargs['append_last_valid_logits'].to(device) AttributeError: 'NoneType' object has no attribute 'to' 命令行为CUDA_VISIBLE_DEVICES=0,1,2,3 swift infer --model_type molmo-7b-d \