ChatGLM-6B
ChatGLM-6B copied to clipboard
[BUG/Help] <title>LLVM ERROR: Failed to infer result type(s).
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
loc("varianceEps"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":228:0)): error: input types 'tensor<1x4x1xf16>' and 'tensor<1xf32>' are not broadcast compatible LLVM ERROR: Failed to infer result type(s).
Expected Behavior
No response
Steps To Reproduce
active environment : chatglm-6b
active env location : /Users/jessica/anaconda3/envs/chatglm-6b
shell level : 2
user config file : /Users/jessica/.condarc
populated config files : /Users/jessica/.condarc conda version : 23.3.1 conda-build version : 3.24.0 python version : 3.10.9.final.0 virtual packages : __archspec=1=arm64 __osx=13.3.1=0 __unix=0=0 base environment : /Users/jessica/anaconda3 (writable) conda av data dir : /Users/jessica/anaconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-arm64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/jessica/anaconda3/pkgs /Users/jessica/.conda/pkgs envs directories : /Users/jessica/anaconda3/envs /Users/jessica/.conda/envs platform : osx-arm64 user-agent : conda/23.3.1 requests/2.28.1 CPython/3.10.9 Darwin/22.4.0 OSX/13.3.1 UID:GID : 501:20 netrc file : None offline mode : False
Environment
- OS:osx-arm64
- Python:3.10
- Transformers:4.27.1
- PyTorch:2.0.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :
Anything else?
No response
Hey !
I have the same problem ... Did you fix it ?
same error =(
same error =(
有人知道如何解决吗?
same issue
You need to install PyTorch-nightly to use MPS backend. PyTorch 2.0 is not enough.
pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu
pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu
我使用了这个方法,没有这个错误了,棒
try the final ultra :!!!
pip3 install --prefer-binary accelerate transformers diffusers einops pytorch-lightning torchsde safetensors torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
you need to uninstall torch torchvision torchaudio first, and then run pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu