imoneoi / openchat

OpenChat: Advancing Open-source Language Models with Imperfect Data
https://openchat.team
Apache License 2.0
5.26k stars 398 forks source link

anaconda installation needs specified versions of python=3.11.5 and torch, torchaudio, torchvision versions #72

Open alkanet88 opened 1 year ago

alkanet88 commented 1 year ago

hi guys I just tried to install with anaconda and ran into some dep issues and a python version warning when i just followed the plain instructions detailed here: https://dev.to/alkanet88/openchat-installation-144

tldr the default command conda create -y --name openchat python=3.11 created with python 3.11.6 and also default installation of xformers was 0.0.22.part7 or something like that and wasn't recognized as a dependency, in my case i just reinstalled the version of xformers==0.0.22, but maybe you can change it in requirements.txt to xformers==0.0.22.* ? i haven't tested this, but i don't think it would work because there was a dependency conflict where vllm wanted torch 2.0.1 but xformers 0.0.22.part7 wanted torch 2.1.0

alkanet88 commented 1 year ago

update: sorry guys, tried to reproduce the issue but it wasn't xformers=0.0.22, i noticed that it was already installed as such by default :eyes:. i'll post more updates to what i did exactly.

alkanet88 commented 1 year ago

alright so here's the list of commands that i originally ran after running into the problem but everything was resolved after these commands.

  205  conda create -y --name openchat python=3.11.5
  206  conda activate openchat
  207  pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  208  pip3 install ochat
  212  pip uninstall torch torchaudio torchvision
  213  pip install torch==2.1.0 torchaudio==2.1.0 torchvision==0.16.0
  218  pip install --upgrade xformers
  219  pip uninstall torch torchaudio torchvision
  220  pip install --upgrade xformers
  221  pip install torch==2.0.1
  222  pip install torch==2.1.0
  223  pip uninstall xformers
  224  pip install xformers==0.0.22
  229  pip check
  230  python -m ochat.serving.openai_api_server --model openchat/openchat_3.5

so I recreated the issue when I installed via anaconda according to the instructions on github. anyways I was able to install everything without an issue with the following steps:

pip install xformers==0.0.22
pip install ochat

and no dep issues so far

pip install torch==2.0.1

everything fine so far. then i tried to install torchaudio and torchvision and it tried to install torch 2.1.0, then i specified versions for these:

pip install torchaudio==2.0.2  torchvision==0.15.2

and everything was fine.

so when i ran pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 that's when it messed up the deps by installing the latest versions of these packages. so actually need to specify the versions of torch, torchaudio, and torchvision

imoneoi commented 1 year ago

@alkanet88 Can you try the following commands which creates a fresh conda env and install dependencies?

conda create -y --name openchat python=3.11
conda activate openchat

pip3 install ochat
alkanet88 commented 1 year ago

yup that works just fine, also, it doesn't install torchvision or torchaudio.