You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice if the README can add the prerequisites for setting up the environment.
I'll update the README. I believe these packages are only available on Linux. Windows users might be able to use WSL (see issue #19), but I don't think this will run on macOS.
For anyone trying to run inference on a Mac (fyi the training scripts will not work):
This environment.yml worked for me. Since Macs don’t have a CUDA device, you’re going to have to use CPU packages. There is a way to leverage GPU acceleration with MPS but I haven’t tried that yet.
For inference, you’d have to modify the Python script to use CPU. I’m going to put up a PR soon, but for now, reference this bot.py.
Changes:
Remove nccl (only works on Linux). Note, you won’t be able to use training scripts because nccl only works on Linux. (Maybe LoRa will still work?)
add Rust to the conda dependency list because it is needed to build the pip wheel for transformers on Mac.
Indeed, removing if/else and leaving only: torch_dtype = torch.bfloat16 made a trick. BTW, it is super slow (1 word per min ) in answering :)
You don't need to modify the if/else statement if you pass --no-gpu and -r as args. See this for more info.
Yeah, that is expected if you're running this on CPU. However, on Silicon, you should be able to set the device to mps and it should use acceleration. That is, change cpu in this line to mps and it should do the trick :)
Indeed, removing if/else and leaving only: torch_dtype = torch.bfloat16 made a trick. BTW, it is super slow (1 word per min ) in answering :)
You don't need to modify the if/else statement if you pass --no-gpu and -r as args. See this for more info.
Yeah, that is expected if you're running this on CPU. However, on Silicon, you should be able to set the device to mps and it should use acceleration. That is, change cpu in this line to mps and it should do the trick :)
well when tired to change to mps,
got:
The operator 'aten::repeat_interleave.self_int' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/_temp/anaconda/conda-bld/pytorch_1670525498485/work/aten/src/ATen/mps/MPSFallback.mm:11.)
input_ids = input_ids.repeat_interleave(expand_size, dim=0)
and then:
RuntimeError: Currently topk on mps works only for k<=16
I can't reproduce this error on an M2 (following the instructions I provided). This seems like a PyTorch error.
The only modification to the code was to change cpu to mps like I described earlier. Here's the command I ran: python3 inference/bot.py --model togethercomputer/RedPajama-INCITE-Base-3B-v1 --no-gpu -r 16
Getting better speeds but still not great. Read this blogpost if you want faster CPU inference
Activity
jkyndir commentedon Mar 15, 2023
i encountered a similar issue:
Any help would be greatly appreciated.
I'm on a Windows machine. Is this package not supported on Windows??!!!
wallon-ai commentedon Mar 15, 2023
same issue. I'm on ubuntu.
jkyndir commentedon Mar 15, 2023
ugh, this sucks.
wish the requirements n instructions are clearer.
JiliHili commentedon Mar 15, 2023
#19 (comment)
jayshah96 commentedon Mar 15, 2023
same issue on mac
yibeilaopo commentedon Mar 16, 2023
I removed this line first and then did the installation, and then executed
conda install -c conda-forge ncclsamchen8008 commentedon Mar 16, 2023
any update? I am still having this issue.
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
I checked cupy, particularly in https://docs.cupy.dev/en/stable/install.html, where the version is not existed.
CUDA
Command
v10.2 (x86_64)
pip install cupy-cuda102
v10.2 (aarch64 - JetPack 4)
pip install cupy-cuda102 -f https://pip.cupy.dev/aarch64
v11.0 (x86_64)
pip install cupy-cuda110
v11.1 (x86_64)
pip install cupy-cuda111
v11.2 ~ 11.8 (x86_64)
pip install cupy-cuda11x
v11.2 ~ 11.8 (aarch64 - JetPack 5 / Arm SBSA)
pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64
v12.x (x86_64)
pip install cupy-cuda12x
v12.x (aarch64 - JetPack 5 / Arm SBSA)
pip install cupy-cuda12x -f https://pip.cupy.dev/aarch64
juntezhang commentedon Mar 16, 2023
I am getting the same issue with Mamba.
Getting the following errors:
Running on macOS 12.16.3
Would be nice if the README can add the prerequisites for setting up the environment.
csris commentedon Mar 18, 2023
I'll update the README. I believe these packages are only available on Linux. Windows users might be able to use WSL (see issue #19), but I don't think this will run on macOS.
Nemunas commentedon May 11, 2023
this helped on ubuntu:
conda config --set channel_priority false
orangetin commentedon May 24, 2023
For anyone trying to run inference on a Mac (fyi the training scripts will not work):
This environment.yml worked for me. Since Macs don’t have a CUDA device, you’re going to have to use CPU packages. There is a way to leverage GPU acceleration with MPS but I haven’t tried that yet.
For inference, you’d have to modify the Python script to use CPU. I’m going to put up a PR soon, but for now, reference this bot.py.
Changes:
nccl(only works on Linux). Note, you won’t be able to use training scripts becausencclonly works on Linux. (Maybe LoRa will still work?)numpyandpillowfaiss-gputofaiss-cpupytorch-cuda,cupy,cudatoolkit(cuda dependency)environment.yml for Mac:
EdgBuc commentedon Jun 1, 2023
managed to run, thank to @orangetin
But when write any command, end up with:
Mac M1.
orangetin commentedon Jun 1, 2023
@EdgBuc make sure the dtype is not
float16. Set it to eitherbfloat16orfloat32. (CPU does not support float16). Reference this line.EdgBuc commentedon Jun 2, 2023
Indeed,
removing if/else and leaving only:
torch_dtype = torch.bfloat16made a trick.BTW, it is super slow (1 word per min ) in answering :)
orangetin commentedon Jun 2, 2023
You don't need to modify the if/else statement if you pass
--no-gpuand-ras args. See this for more info.Yeah, that is expected if you're running this on CPU. However, on Silicon, you should be able to set the device to
mpsand it should use acceleration. That is, changecpuin this line tompsand it should do the trick :)EdgBuc commentedon Jun 2, 2023
well when tired to change to
mps,got:
and then:
orangetin commentedon Jun 2, 2023
I can't reproduce this error on an M2 (following the instructions I provided). This seems like a PyTorch error.
The only modification to the code was to change
cputompslike I described earlier. Here's the command I ran:python3 inference/bot.py --model togethercomputer/RedPajama-INCITE-Base-3B-v1 --no-gpu -r 16Getting better speeds but still not great. Read this blogpost if you want faster CPU inference