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

Update requirements.txt #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update requirements.txt #8

wants to merge 1 commit into from

Conversation

chimosky
Copy link
Member

We had way too many dependencies which were probably sub dependencies, no need for us to list them.

@kshitijdshah99 @XXXJumpingFrogXXX kindly review and confirm this is good.

We had way too many dependencies which were probably sub
dependencies, no need for us to list them.

Signed-off-by: Chihurumnaya Ibiam <[email protected]>
@kshitijdshah99
Copy link
Contributor

Yes the all the langchain dependencies are proper as far as Pippy is concerned👍

@kshitijdshah99
Copy link
Contributor

I'll like to mention other dependencies which too are important to mention I think and have not been mentioned

faiss-cpu==1.9.0
sentence-transformers==3.1.1
torch==2.4.1
transformers==4.45.2
PyMuPDF==1.24.11
huggingface-hub==0.25.2
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.6.77
nvidia-nvtx-cu12==12.1.105
ollama==0.3.3

These are quite fundamental ones used in running our RAG model and most of them are not there in our older version of requirements.txt hence I'll look forward to add them to with the langchain ones.

@chimosky
Copy link
Member Author

I'll like to mention other dependencies which too are important to mention I think and have not been mentioned

faiss-cpu==1.9.0
sentence-transformers==3.1.1
torch==2.4.1
transformers==4.45.2
PyMuPDF==1.24.11
huggingface-hub==0.25.2
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.6.77
nvidia-nvtx-cu12==12.1.105
ollama==0.3.3

These are quite fundamental ones used in running our RAG model and most of them are not there in our older version of requirements.txt hence I'll look forward to add them to with the langchain ones.

If they're direct dependencies then we should add them, I know FAISS is one.

@kshitijdshah99
Copy link
Contributor

Yes, this covers most of the fundamental dependencies ik.

@chimosky
Copy link
Member Author

Yes, this covers most of the fundamental dependencies ik.

Alright, thank you!

I'm still waiting for your input @XXXJumpingFrogXXX.

@XXXJumpingFrogXXX
Copy link

I encountered one problem: when I try to load the model and tokenizer, the ModuleNotFoundError is raised.

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from unsloth import FastLanguageModel
2 import torch
3 max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
4 dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
5 load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.

/usr/local/lib/python3.10/dist-packages/unsloth/init.py in
95
96 # Try loading bitsandbytes and triton
---> 97 import bitsandbytes as bnb
98
99 if "SPACE_AUTHOR_NAME" not in os.environ and "SPACE_REPO_NAME" not in os.environ:

ModuleNotFoundError: No module named 'bitsandbytes'

@chimosky
Copy link
Member Author

chimosky commented Oct 24, 2024

Hmmm, unsloth should've handled the installation of its own dependencies.

It's also strange that you're experiencing this now when you've not experienced it before, you'll have to install bitsandbytes using pip.

You should also use ticks to make code blocks easier to read, see code blocks.

@XXXJumpingFrogXXX
Copy link

Installing bitsandbytes alone does not resolve the issue, as there are more packages waiting to be installed afterwards, such as triton, xformers, trl, etc.
It seems there is some problem with Unsloth's installation.

How should we modify requirements.txt to achieve the effects of the following two scripts?

pip install unsloth
pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"

@chimosky
Copy link
Member Author

Installing bitsandbytes alone does not resolve the issue, as there are more packages waiting to be installed afterwards, such as triton, xformers, trl, etc. It seems there is some problem with Unsloth's installation.

How should we modify requirements.txt to achieve the effects of the following two scripts?

pip install unsloth pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"

By listing the packages passed as packages in requirements.txt.

@XXXJumpingFrogXXX
Copy link

When I try to install the dependencies with our original requirements file, it will throw this error:
ERROR: Cannot install -r requirements.txt (line 117), -r requirements.txt (line 41), -r requirements.txt (line 51) and -r requirements.txt (line 52) because these package versions have conflicting dependencies.

The conflict is caused by:
datasets 3.0.0 depends on pyarrow>=15.0.0
db-dtypes 1.3.0 depends on pyarrow>=3.0.0
tensorflow-datasets 4.9.6 depends on pyarrow
cudf-cu12 24.4.1 depends on pyarrow<15.0.0a0 and >=14.0.1

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@XXXJumpingFrogXXX
Copy link

Installing bitsandbytes alone does not resolve the issue, as there are more packages waiting to be installed afterwards, such as triton, xformers, trl, etc. It seems there is some problem with Unsloth's installation.
How should we modify requirements.txt to achieve the effects of the following two scripts?
pip install unsloth pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"

By listing the packages passed as packages in requirements.txt.

The missing packages might be numerous, making it difficult to manually add all the remaining required packages.

@chimosky
Copy link
Member Author

The missing packages might be numerous, making it difficult to manually add all the remaining required packages.

Which is why you install the major packages and pip should handle the rest, can you start with a blank slate, install just the directly used dependencies and notice what other things get installed as they're being installed.

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

Successfully merging this pull request may close these issues.

3 participants