qwen-audio-chat按照requirement安装环境,包不兼容
Describe the bug What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图) 使用最新代码安装的新环境,多卡训练qwen-audio-chat时遇到疑似torch或者transformers库版本兼容性问题,希望得到一个目前兼容的torch,transformers的版本号。
具体报错信息:
Traceback (most recent call last):
File "llm_sft.py", line 7, in
output = sft_main()
File "/home/work_nfs7/user/swift24/swift/utils/run_utils.py", line 31, in x_main
result = llm_x(args, **kwargs)
File "/home/work_nfs7/user/swift24/swift/llm/sft.py", line 232, in llm_sft
trainer.train(training_args.resume_from_checkpoint)
File "/home/work_nfs7/user/swift24/swift/trainers/trainers.py", line 50, in train
res = super().train(*args, **kwargs)
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/transformers/trainer.py", line 1780, in train
return inner_training_loop(
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/transformers/trainer.py", line 2085, in _inner_training_loop
for step, inputs in enumerate(epoch_iterator):
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/accelerate/data_loader.py", line 452, in iter
current_batch = next(dataloader_iter)
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
return self._process_data(data)
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
data.reraise()
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/_utils.py", line 722, in reraise
raise exception
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop
data = fetcher.fetch(index)
File "/home/environment/user/anaconda3/envs/swift24c/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
TypeError: data_collator() got an unexpected keyword argument 'pad_to_multiple_of'
Your hardware and system info
CUDA 12.1 GPU 8*2080Ti
torch 2.2.2
Write your system info like CUDA version/system/GPU/torch version here(在这里给出硬件信息和系统信息,如CUDA版本,系统,GPU型号和torch版本等)
Additional context Add any other context about the problem here(在这里补充其他信息) 完整 pip 安装版本: Package Version
absl-py 2.1.0 accelerate 0.29.3 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.5 aiosignal 1.3.1 aliyun-python-sdk-core 2.15.1 aliyun-python-sdk-kms 2.16.2 altair 5.3.0 annotated-types 0.6.0 anyio 4.3.0 async-timeout 4.0.3 attrs 23.2.0 cachetools 5.3.3 certifi 2024.2.2 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 coloredlogs 15.0.1 contourpy 1.1.1 cpm-kernels 1.0.11 crcmod 1.7 cryptography 42.0.5 cycler 0.12.1 dacite 1.8.1 datasets 2.18.0 deepspeed 0.14.1 dill 0.3.8 docstring_parser 0.16 einops 0.7.0 eval_type_backport 0.2.0 exceptiongroup 1.2.1 fastapi 0.110.2 ffmpy 0.3.2 filelock 3.13.4 fonttools 4.51.0 frozenlist 1.4.1 fsspec 2024.2.0 gast 0.5.4 google-auth 2.29.0 google-auth-oauthlib 1.0.0 gradio 4.27.0 gradio_client 0.15.1 grpcio 1.62.2 h11 0.14.0 hjson 3.1.0 httpcore 1.0.5 httpx 0.27.0 huggingface-hub 0.22.2 humanfriendly 10.0 idna 3.7 importlib_metadata 7.1.0 importlib_resources 6.4.0 jieba 0.42.1 Jinja2 3.1.3 jmespath 0.10.0 joblib 1.4.0 jsonschema 4.21.1 jsonschema-specifications 2023.12.1 kiwisolver 1.4.5 Markdown 3.6 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.7.5 mdurl 0.1.2 modelscope 1.13.3 mpmath 1.3.0 ms-swift 2.0.2 multidict 6.0.5 multiprocess 0.70.16 networkx 3.1 ninja 1.11.1.1 nltk 3.8.1 numpy 1.24.4 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.19.3 nvidia-nvjitlink-cu12 12.4.127 nvidia-nvtx-cu12 12.1.105 oauthlib 3.2.2 optimum 1.19.0 orjson 3.10.1 oss2 2.18.4 packaging 24.0 pandas 2.0.3 peft 0.10.0 pillow 10.3.0 pip 23.3.1 pkgutil_resolve_name 1.3.10 platformdirs 4.2.0 protobuf 5.26.1 psutil 5.9.8 py-cpuinfo 9.0.0 pyarrow 16.0.0 pyarrow-hotfix 0.6 pyasn1 0.6.0 pyasn1_modules 0.4.0 pycparser 2.22 pycryptodome 3.20.0 pydantic 2.7.0 pydantic_core 2.18.1 pydub 0.25.1 Pygments 2.17.2 pynvml 11.5.0 pyparsing 3.1.2 python-dateutil 2.9.0.post0 python-multipart 0.0.9 pytz 2024.1 PyYAML 6.0.1 referencing 0.34.0 regex 2024.4.16 requests 2.31.0 requests-oauthlib 2.0.0 rich 13.7.1 rouge 1.0.1 rpds-py 0.18.0 rsa 4.9 ruff 0.4.1 safetensors 0.4.3 scipy 1.10.1 semantic-version 2.10.0 sentencepiece 0.2.0 setuptools 68.2.2 shellingham 1.5.4 shtab 1.7.1 simplejson 3.19.2 six 1.16.0 sniffio 1.3.1 sortedcontainers 2.4.0 starlette 0.37.2 sympy 1.12 tensorboard 2.14.0 tensorboard-data-server 0.7.2 tiktoken 0.6.0 tokenizers 0.15.2 tomli 2.0.1 tomlkit 0.12.0 toolz 0.12.1 torch 2.2.2 tqdm 4.66.2 transformers 4.39.3 transformers-stream-generator 0.0.5 triton 2.2.0 trl 0.8.6 typer 0.12.3 typing_extensions 4.11.0 tyro 0.8.3 tzdata 2024.1 urllib3 2.2.1 uvicorn 0.29.0 websockets 11.0.3 Werkzeug 3.0.2 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.18.1
更新一下swift 用main分支 或者使用2.0.3.post1