THUDM / ChatGLM3

ChatGLM3 series: Open Bilingual Chat LLMs | 开源双语对话语言模型
Apache License 2.0
13.14k stars 1.52k forks source link

problems when finetuning with lora #1232

Closed RemiAlliah closed 1 month ago

RemiAlliah commented 1 month ago

image It seems like tensor.to() function doen't support non_blocking as an input, and when it uses tensor.to(device) method another exception occurs. image What should I do to solve this? This is screenshot of "pip list" Package Version


accelerate 0.30.1 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.3 altair 5.3.0 annotated-types 0.7.0 anyio 4.3.0 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 arxiv 2.1.0 asttokens 2.4.1 async-lru 2.0.4 async-timeout 4.0.3 attrs 23.2.0 Babel 2.15.0 beautifulsoup4 4.12.3 bleach 6.1.0 blinker 1.8.2 cachetools 5.3.3 certifi 2024.2.2 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 comm 0.2.2 contourpy 1.2.1 cpm-kernels 1.0.11 crcmod 1.7 cryptography 42.0.7 cycler 0.12.1 dataclasses-json 0.6.6 datasets 2.18.0 debugpy 1.8.1 decorator 5.1.1 defusedxml 0.7.1 dill 0.3.8 distro 1.9.0 dnspython 2.6.1 einops 0.8.0 email_validator 2.1.1 exceptiongroup 1.2.1 executing 2.0.1 fastapi 0.111.0 fastapi-cli 0.0.4 fastjsonschema 2.19.1 feedparser 6.0.10 ffmpy 0.3.2 filelock 3.13.1 fonttools 4.51.0 fqdn 1.5.1 frozenlist 1.4.1 fsspec 2024.2.0 gast 0.5.4 gitdb 4.0.11 GitPython 3.1.43 gradio 4.31.4 gradio_client 0.16.4 greenlet 3.0.3 h11 0.14.0 httpcore 1.0.5 httptools 0.6.1 httpx 0.27.0 huggingface-hub 0.23.0 idna 3.7 importlib_metadata 7.1.0 importlib_resources 6.4.0 intel-openmp 2021.4.0 ipykernel 6.29.4 ipython 8.24.0 ipywidgets 8.1.2 isoduration 20.11.0 jedi 0.19.1 jieba 0.42.1 Jinja2 3.1.3 jmespath 0.10.0 joblib 1.4.2 json5 0.9.25 jsonpatch 1.33 jsonpointer 2.4 jsonschema 4.22.0 jsonschema-specifications 2023.12.1 jupyter 1.0.0 jupyter_client 8.6.1 jupyter-console 6.6.3 jupyter_core 5.7.2 jupyter-events 0.10.0 jupyter-lsp 2.2.5 jupyter_server 2.14.0 jupyter_server_terminals 0.5.3 jupyterlab 4.2.1 jupyterlab_pygments 0.3.0 jupyterlab_server 2.27.2 jupyterlab_widgets 3.0.10 kiwisolver 1.4.5 langchain 0.2.0 langchain-core 0.2.0 langchain-text-splitters 0.2.0 langchainhub 0.1.15 langsmith 0.1.60 latex2mathml 3.77.0 loguru 0.7.2 Markdown 3.6 markdown-it-py 3.0.0 MarkupSafe 2.1.5 marshmallow 3.21.2 matplotlib 3.9.0 matplotlib-inline 0.1.7 mdtex2html 1.3.0 mdurl 0.1.2 mistune 3.0.2 mkl 2021.4.0 modelscope 1.14.0 mpi4py 3.1.6 mpmath 1.3.0 multidict 6.0.5 multiprocess 0.70.16 mypy-extensions 1.0.0 nbclient 0.10.0 nbconvert 7.16.4 nbformat 5.10.4 nest-asyncio 1.6.0 networkx 3.2.1 nltk 3.8.1 notebook 7.2.0 notebook_shim 0.2.4 numpy 1.26.3 openai 1.30.1 orjson 3.10.3 oss2 2.18.5 overrides 7.7.0 packaging 23.2 pandas 2.2.2 pandocfilters 1.5.1 parso 0.8.4 peft 0.11.1 pillow 10.2.0 pip 24.0 platformdirs 4.2.2 prometheus_client 0.20.0 prompt-toolkit 3.0.43 protobuf 4.25.3 psutil 5.9.8 pure-eval 0.2.2 pyarrow 16.1.0 pyarrow-hotfix 0.6 pycparser 2.22 pycryptodome 3.20.0 pydantic 2.7.1 pydantic_core 2.18.2 pydeck 0.9.1 pydub 0.25.1 Pygments 2.18.0 PyJWT 2.8.0 pyparsing 3.1.2 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-json-logger 2.0.7 python-multipart 0.0.9 pytz 2024.1 pywin32 306 pywinpty 2.0.13 PyYAML 6.0.1 pyzmq 26.0.3 qtconsole 5.5.2 QtPy 2.4.1 referencing 0.35.1 regex 2024.5.15 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.7.1 rouge-chinese 1.0.3 rpds-py 0.18.1 ruamel.yaml 0.18.6 ruamel.yaml.clib 0.2.8 ruff 0.4.4 safetensors 0.4.3 scikit-learn 1.4.2 scipy 1.13.0 semantic-version 2.10.0 Send2Trash 1.8.3 sentence-transformers 2.7.0 sentencepiece 0.2.0 setuptools 69.5.1 sgmllib3k 1.0.0 shellingham 1.5.4 simplejson 3.19.2 six 1.16.0 smmap 5.0.1 sniffio 1.3.1 sortedcontainers 2.4.0 soupsieve 2.5 SQLAlchemy 2.0.30 sse-starlette 2.1.0 stack-data 0.6.3 starlette 0.37.2 streamlit 1.34.0 sympy 1.12 tbb 2021.11.0 tenacity 8.3.0 terminado 0.18.1 threadpoolctl 3.5.0 tiktoken 0.7.0 timm 1.0.3 tinycss2 1.3.0 tokenizers 0.19.1 toml 0.10.2 tomli 2.0.1 tomlkit 0.12.0 toolz 0.12.1 torch 2.3.0+cu121 torchaudio 2.3.0+cu121 torchvision 0.18.0+cu121 tornado 6.4 tqdm 4.66.4 traitlets 5.14.3 transformers 4.41.0 typer 0.12.3 types-python-dateutil 2.9.0.20240316 types-requests 2.32.0.20240521 typing_extensions 4.9.0 typing-inspect 0.9.0 tzdata 2024.1 ujson 5.10.0 uri-template 1.3.0 urllib3 2.2.1 uvicorn 0.29.0 watchdog 4.0.0 watchfiles 0.21.0 wcwidth 0.2.13 webcolors 1.13 webencodings 0.5.1 websocket-client 1.8.0 websockets 11.0.3 wheel 0.43.0 widgetsnbextension 4.0.10 win32-setctime 1.1.0 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zhipuai 2.1.0 zipp 3.18.2

Lorrrrraine commented 1 month ago

I also encountered the same issue. It happened during the evaluation of the model in the fine-tuning process.

Lorrrrraine commented 1 month ago

I also encountered the same issue. It happened during the evaluation of the model in the fine-tuning process.

Try downgrading transformers to version 4.40.0.

RemiAlliah commented 1 month ago

I also encountered the same issue. It happened during the evaluation of the model in the fine-tuning process.

Try downgrading transformers to version 4.40.0.

It works! thanks a lot =3=