Skip to content

Direct windows support for unsloth - #1841

Merged
danielhanchen merged 4 commits into
unslothai:mainfrom
adityaghai07:support_windows
Feb 28, 2025
Merged

danielhanchen merged 4 commits into
unslothai:mainfrom
adityaghai07:support_windows

Conversation

@adityaghai07

Copy link
Copy Markdown
Contributor

This PR is a continuation of #1821

Direct Windows support for Unsloth

Feature Overview

These changes allow user to install unsloth on windows directly without any dependency issues using a simple command:

pip install "unsloth[windows] @ git+https://github.com/unslothai/unsloth.git"

Implementation Details

  • Updated pyproject.toml to allow installation of unsloth and all its dependencies directly without manual work.

Reasoning

  • First issue was to configure GPU by installing GPU drivers and CUDA drivers. This is a necessary prerequisite for PyTorch to utilize GPU acceleration.
  • As the PyTorch version depends on the versions of CUDA drivers used, we need to install PyTorch specific to the CUDA drivers installed previously. Mismatched versions often cause compatibility issues.
  • On Windows, we need Windows SDK and a compatible C/C++ compiler to run some dependencies, so using Microsoft Visual C++ (MSVC) we can easily install those required components for proper compilation.
  • Finally, we updated pyproject.toml to support direct installation of all dependencies and unsloth, ensuring the package can be installed with a single command without manual intervention.

Testing Details

  • Tested on 4 python versions: 3.9, 3.10, 3.11, 3.12.
  • Tested for 3 different CUDA versions - 11.8, 12.4, 12.6
  • Tested on 2 windows machines with different GPUs to test support across different drivers - GTX 1650, RTX 3050

Contributors

This feature was developed in collaboration with @Captain-T2004.

@danielhanchen

Copy link
Copy Markdown
Member

Ok this is good! One final request - would it be possible to add some screenshots for Windows C++ installations - I know sometimes people can get stuck! Once that's in, I can merge this - great work!

@Captain-T2004

Copy link
Copy Markdown
Contributor

@danielhanchen, We have made the suggested additions, please take a look. Also I had a suggestion, If possible please create a discussion channel specifically related to Windows support for Unsloth. This way people can post the issues they face and we can also add all the solutions we found to the problems we faced.

@danielhanchen
danielhanchen merged commit 0887650 into unslothai:main Feb 28, 2025
@danielhanchen

Copy link
Copy Markdown
Member

@adityaghai07 @Captain-T2004 Can you guys email us :) Email is on my Github profile!

@danielhanchen

Copy link
Copy Markdown
Member

Oh I just noticed it's a bit off on small screens:
image

@shimmyshimmer

Copy link
Copy Markdown
Member

Made a discussion here: #1849

@arnabwithab

Copy link
Copy Markdown

Does the direct pip command not support cuda 12.9?
I am getting the unsloth notimplementederror, despite having followed all the steps as detailed
image

abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
* Direct Windows Support(main)

* Update pyproject.toml

* Update README.md

Added the suggested changes to README
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.

5 participants