Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行python cli_demo.py报错 #671

Open
1 task done
mxldjt opened this issue Mar 25, 2024 · 0 comments
Open
1 task done

运行python cli_demo.py报错 #671

mxldjt opened this issue Mar 25, 2024 · 0 comments

Comments

@mxldjt
Copy link

mxldjt commented Mar 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Traceback (most recent call last):
File "cli_demo.py", line 8 ,in
model = AutoModel.from pretrained("/root/chatglm2-6bSSH),trust_remote_code=True).mlu()
File "/root /for-chatGIm2-6B/transformers-4,30,2 mlu/src/transformers/models/auto/auto factory,py", line 476, in from pretrainedtrust reclass ref,pretrained modelname or path,
File "/root/for-chatGm2-6B/transformers-4.30,2 mlu/src/transformers/dymamic module utils.py", 1ine 443, in get class from dymamic modul**hub kwargS,**kwargreturn get class in module(class namefinal module.replace (" .py",
File "/root/for-chatGIm2-6B/transformers-4,30.2 mlu/src/transformers/dynamic module utils,py", line 164, in get clas in modulemodule=importlib.importmodule (module path)File "/opt/py3.7/lib/python3,7/importlib/ init.py",line 127,in import modulereturnbootstrap.gcd import(name[level:],package, level)
File ""line1006,in gcd import""nportlib.line983,in find and loadFile""lmportli1o.line967,in find and load unlocked"<frozenFileimportlib. bootstrap>"line 677,in load unlocked"<frozenFileimportlib, bootstrap external>",line 728, in exec module
File "<frozenimportlib,bootstrap)line 219,in call with frames removedFile "/root/.cache/huggingface/mners modules/chatglm2-6b/modeling chatglm.py",line 31,in dules/transfoifrom transformers.modeling utils import PreTrainedModel
File "/root/for-chatGIM2-6B/transformers-4.30.2 mlu/src/transformers/modeling utils,py", line 86, in from accelerate importaccelerate versiorversi0l
File "/root/for-chatGLM2-6B/accelerate mlu/src/accelerate/ init.py",line 16,in
from.accelerator import ccelerato)
File "/root/for-chatGIM2-6B/accelerate mlu/src/accelerate/accelerator,py", line 36, in
from11siom state,.checkpointing import load accelerator statersave accelerator state,,save custom state
File "/root/for-chatGIM2-6B/accelerate mlu/src/accelerate/checkpointing,py", line 25, in
from .utils imort (
File "/root/for-chatGIM2-6B/accelerate mlu/src/accelerate/utils/ init py", line 98, in
from .modeling import (
File "/root/for-chatGIM2-6B/accelerate mlu/src/accelerate/utils/modeling,py", line 34, in
from ..state import Acceleratorstatefrom
File "/root/for-chatGLM2-6B/accelerate mlu/src/accelerate/state.py", line 52,in
if is torch xla available():
TypeError: decorating function()missing 1 required positional argument: 'user function'(pytorch)

Expected Behavior

No response

Steps To Reproduce

none

Environment

- OS: kylinV10 sp2
- Python:3.7
- Transformers:4.30.2
- PyTorch: 1.9
- 寒武纪MLU370-s4

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant