Skip to content

Windows Support #1359

Closed
Closed

Description

@jim-plus

Using Python 3.11, pytorch 2.5.1, cuda 12.4 here.

I was able to install a triton wheel of this windows port to ensure compatibility.
https://github.com/woct0rdho/triton-windows

I also locally built a complete wheel for flash attention 2.6.3 to support training, not just inference.

The following command gets pretty far:

pip install --upgrade "unsloth[cu124-ampere-torch250] @ git+https://github.com/unslothai/unsloth.git"

The following prerequistes were satisfied:

Requirement already satisfied: bitsandbytes>=0.43.3 in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (0.44.1)
Requirement already satisfied: packaging in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (24.1)
Requirement already satisfied: ninja in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (1.11.1.1)
Requirement already satisfied: flash-attn>=2.6.3 in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (2.6.3)
Requirement already satisfied: torch in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from bitsandbytes>=0.43.3->unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (2.5.1+cu124)
Requirement already satisfied: numpy in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from bitsandbytes>=0.43.3->unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (1.26.4)
Requirement already satisfied: einops in c:\users\jim\appdata\local\programs\python\python311\lib\site-packages (from flash-attn>=2.6.3->unsloth@ git+https://github.com/unslothai/unsloth.git->unsloth[cu124-ampere-torch250]@ git+https://github.com/unslothai/unsloth.git) (0.8.0)

Unfortunately, this is the current obstacle:

ERROR: xformers-0.0.28.post2-cp311-cp311-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.

Activity

  1. changed the title [-]xformers incompatibility when installing directly on Windows 11 without WSL/WSL2[/-] [+]Windows Support[/+] on Dec 4, 2024
  2. danielhanchen commented on Dec 4, 2024

    @danielhanchen
    Member

    We plan to fix up pyproject.toml to enable Windows support!!

  3. jtabox commented on Dec 10, 2024

    @jtabox

    Is there anything one can do while waiting for the fix? I have the following installed:

    flash_attn    2.6.3
    torch         2.4.0+cu121
    torchvision   0.19.0+cu121
    triton        3.1.0
    vllm          0.6.3.post1
    xformers      0.0.27.post2
    

    but the installation fails because it tries to install xformers 0.0.28.

    Also, from what I understand xformers 0.0.28 are for PyTorch 2.5.0, or am I wrong? So PyTorch 2.4.0 won't work anyway?

  4. danielhanchen commented on Dec 12, 2024

    @danielhanchen
    Member

    @jtabox Sorry on the delay - could you try pip install unsloth unsloth_zoo --no-deps - you will have to install all dependencies manually though

  5. jtabox commented on Dec 12, 2024

    @jtabox

    @jtabox Sorry on the delay - could you try pip install unsloth unsloth_zoo --no-deps - you will have to install all dependencies manually though

    It's no problem, no need to apologize :) Actually I pretended I'm pip and went through the repo's pyproject.toml step-by-step, installing the correct dependencies manually, except the specific version of xformers, I kept the version I mentioned above. I had some installed already, installed a couple more and finally installed unsloth_zoo, and apparently it worked. Haven't tested extensively, but nothing has complained so far.

  6. Datbwoyyy commented on Feb 17, 2025

    @Datbwoyyy

    Im Working on this

  7. danielhanchen commented on Feb 17, 2025

    @danielhanchen
    Member

    @Datbwoyyy Fantastic that'll be helpful! :)

  8. versipellis commented on Feb 19, 2025

    @versipellis
    Contributor

    @danielhanchen It's possible that pyproject.toml was bugged when @jim-plus originally tested this, but the dependencies looked correct today when I tested it (I did add the latest xformers wheels in #1753, however). I do want to point out this line from the OP:

    Unfortunately, this is the current obstacle:

    ERROR: xformers-0.0.28.post2-cp311-cp311-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.
    

    When @jim-plus tried to install it, it appears to have been trying to install the Linux wheel, which was why that error was thrown - that shouldn't be happening.

  9. rolandtannous commented on Jun 7, 2025

    @rolandtannous
    Contributor

    Hi guys,

    checkout this PR
    #1841

    The tutorial
    https://docs.unsloth.ai/get-started/installing-+-updating/windows-installation

    and this step by step small guide from a community member
    #1849 (comment)

    will close this for now. Feel free to comment on #1849 with any issues you are still having. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

currently fixing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions