THUDM / ChatGLM-6B

ChatGLM-6B: An Open Bilingual Dialogue Language Model | 开源双语对话语言模型
Apache License 2.0
39.96k stars 5.15k forks source link

[BUG/Help] <title> When executing in the mac terminal, I get the error: Segmentation fault: 11 #1475

Open Charirin opened 2 months ago

Charirin commented 2 months ago

Is there an existing issue for this?

Current Behavior

No matter what I try, there is always this damn Segmentation fault: 11 Please tell me who has encountered this situation and how to deal with it. Please help me.

image

Expected Behavior

No response

Steps To Reproduce

1.ipython 2.run with import os from transformers import AutoTokenizer, AutoModel os.environ['KMP_DUPLICATE_LIB_OK'] = 'True' tokenizer = AutoTokenizer.from_pretrained("/Users/susun/workspace/models/chatglm2-6b-int4", trust_remote_code=True,revision="v1.0.0") model = AutoModel.from_pretrained("/Users/susun/workspace/models/chatglm2-6b-int4", trust_remote_code=True,revision="v1.0.0").float() model.eval()

got

Environment

Mac m2  macos 14.4.1  
python=3.10.14
torch=2.2.2
torchaudio=2.2.2 
torchvision=0.17.2
transformers= 4.27.1

Anything else?

No response

Charirin commented 2 months ago

please help me