Skip to content

GETTING ERROR WHILE RUNNING A KAGGLE NOTEBOOK #1335

Closed

Description

@MuhammadBilal848

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

Activity

  1. Cirr0e commented on Nov 25, 2024

    @Cirr0e
  2. danielhanchen commented on Nov 25, 2024

    @danielhanchen
    Member

    @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
  3. aeltorio commented on Nov 26, 2024

    @aeltorio

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

  4. MuhammadBilal848 commented on Nov 27, 2024

    @MuhammadBilal848
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions