unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi, Qwen 2.5 & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
18.56k stars 1.3k forks source link

Which Torch & Python #1234

Closed IzzyHibbert closed 2 weeks ago

IzzyHibbert commented 3 weeks ago

Hi guys. spent my morning trying to install Unsloth, no success due to compatibility issues..

I am using Python 3.11 CUDA 12.1

I started with a virtual environment with 2.5.1, where I tried several times to start the installation with pip install unsloth "xformers==0.0.28.post2" but it's aKO all the times with :

ModuleNotFoundError: No module named 'torch'

I moved to Torch 2.5.0 with no luck either. Then upgraded Python to 3.13, no luck even there.

What's a combination that works ? If 2.5.1 should work, I cannot explain the error (here below): any idea ??

        File "C:\Users\37019Administrator\AppData\Local\Temp\pip-build-env-b2gf9a1h\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\37019Administrator\AppData\Local\Temp\pip-build-env-b2gf9a1h\overlay\Lib\site-packages\setuptools\build_meta.py", line 303, in _get_build_requires
          self.run_setup()
        File "C:\Users\37019Administrator\AppData\Local\Temp\pip-build-env-b2gf9a1h\overlay\Lib\site-packages\setuptools\build_meta.py", line 521, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\37019Administrator\AppData\Local\Temp\pip-build-env-b2gf9a1h\overlay\Lib\site-packages\setuptools\build_meta.py", line 319, in run_setup
          exec(code, locals())
        File "<string>", line 24, in <module>
      ModuleNotFoundError: No module named 'torch
IzzyHibbert commented 3 weeks ago

Even when trying to install a prebuilt 0.28.post2 from https://github.com/facebookresearch/xformers/archive/refs/tags/v0.0.28.post2.zip

with Pytorch torch 2.5.0+cu121 torchaudio 2.5.0+cu121 torchvision 0.20.0+cu121

I see the same error..

    File "<string>", line 24, in <module>
  ModuleNotFoundError: No module named 'torch'
  [end of output]
IzzyHibbert commented 2 weeks ago

Made it by installing triton under windows.

danielhanchen commented 2 weeks ago

Great you solved it!

jameszhan02 commented 1 week ago

installing triton under windows.

do you have more detail about this solution?

IzzyHibbert commented 1 week ago

best solution for windows is through docker and wsl GitHub - Jiar/jupyter4unsloth: Jupyter for Unsloth

Il Ven 15 Nov 2024, 20:05 Kara X_X @.***> ha scritto:

installing triton under windows.

do you have more detail about this solution?

— Reply to this email directly, view it on GitHub https://github.com/unslothai/unsloth/issues/1234#issuecomment-2479736258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK2JDTKEHKPCV6RTJJ5NHY32AZAWHAVCNFSM6AAAAABREEPB2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZG4ZTMMRVHA . You are receiving this because you modified the open/close state.Message ID: @.***>