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

GETTING ERROR WHILE RUNNING A KAGGLE NOTEBOOK #1335

Closed
MuhammadBilal848 opened this issue Nov 25, 2024 · 4 comments
Closed

GETTING ERROR WHILE RUNNING A KAGGLE NOTEBOOK #1335

MuhammadBilal848 opened this issue Nov 25, 2024 · 4 comments

Comments

@MuhammadBilal848
Copy link

I am trying to run a mistral 22B model on kaggle but getting this error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[7], line 1
----> 1 from unsloth import FastLanguageModel
      2 import torch
      3 max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!

File /opt/conda/lib/python3.10/site-packages/unsloth/__init__.py:76
     71     raise ImportError(
     72         "Unsloth: Pytorch is not installed. Go to [https://pytorch.org/.\n](https://pytorch.org/n)"\
     73         "We have some installation instructions on our Github page."
     74     )
     75 except Exception as exception:
---> 76     raise exception
     77 pass
     79 # We support Pytorch 2
     80 # Fixes https://github.com/unslothai/unsloth/issues/38

File /opt/conda/lib/python3.10/site-packages/unsloth/__init__.py:69
     66 os.environ["UNSLOTH_IS_PRESENT"] = "1"
     68 try:
---> 69     import torch
     70 except ModuleNotFoundError:
     71     raise ImportError(
     72         "Unsloth: Pytorch is not installed. Go to [https://pytorch.org/.\n](https://pytorch.org/n)"\
     73         "We have some installation instructions on our Github page."
     74     )

File /opt/conda/lib/python3.10/site-packages/torch/__init__.py:367
    365     if USE_GLOBAL_DEPS:
    366         _load_global_deps()
--> 367     from torch._C import *  # noqa: F403
    370 class SymInt:
    371     """
    372     Like an int (including magic methods), but redirects all operations on the
    373     wrapped node. This is used in particular to symbolically record operations
    374     in the symbolic shape workflow.
    375     """

ImportError: /opt/conda/lib/python3.10/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12
@Cirr0e

This comment was marked as spam.

@danielhanchen
Copy link
Contributor

@MuhammadBilal848 Did you try using this specific installation cell:

%%capture
!pip install pip3-autoremove
!pip-autoremove torch torchvision torchaudio -y
!pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu121
!pip install unsloth

@aeltorio
Copy link

@danielhanchen
Your solution works for me.
Thank you for you amazing library.
Ronan

@MuhammadBilal848
Copy link
Author

@MuhammadBilal848 Did you try using this specific installation cell:

%%capture
!pip install pip3-autoremove
!pip-autoremove torch torchvision torchaudio -y
!pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu121
!pip install unsloth

It worked. Thanks. Closing this issue.

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

No branches or pull requests

4 participants