Not Able to Load unsloth in WIndows #2548
Unanswered
Prathmesh-1991
asked this question in
Q&A
Replies: 1 comment
|
I had issues with triton-windows and just gave up and used WSL and a linux dual boot instead. I think unsloth works natively with triton (linux only) and requires a degree of patching to get things patched with tritin-windows. Conceptually it should work (maybe?) but I was never successful. I'd just throw your logs into chatGPT, mine said this:
python But you'll want to find where the triton-windows dlls are first and set symlinks too if needed. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am trying to run demo notebook on my local machine.
I have installed all the necessary required python library as well as visual studio components as suggested on this [https://docs.unsloth.ai/get-started/installing-+-updating/windows-installation]
But when i am trying to loan unsloth , its is giving me error
ImportError: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
Below is my environment info
OS :- Microsoft Windows 11 Pro
Python:- 3.11
Pytorch : 2.6.0
Cuda :- 12.4
I am using python 3.11 and installed below packages into my virtual environment. [Created virtual environment with venv command].
Using pytorch 2.6.0 with Cuda 12.4
(ocr_env) D:\Custom_OCR\OCR>pip list
Package Version
accelerate 1.6.0
aiohappyeyeballs 2.6.1
aiohttp 3.11.18
aiosignal 1.3.2
annotated-types 0.7.0
anyio 4.9.0
asttokens 3.0.0
attrs 25.3.0
bitsandbytes 0.45.5
certifi 2025.1.31
charset-normalizer 3.4.1
colorama 0.4.6
comm 0.2.2
contourpy 1.3.2
cut-cross-entropy 25.1.1
cycler 0.12.1
datasets 3.6.0
debugpy 1.8.14
decorator 5.2.1
dill 0.3.8
diskcache 5.6.3
docstring_parser 0.16
executing 2.2.0
filelock 3.18.0
fonttools 4.57.0
frozenlist 1.6.0
fsspec 2025.3.0
h11 0.16.0
hf_transfer 0.1.9
httpcore 1.0.9
httpx 0.28.1
huggingface-hub 0.31.1
idna 3.10
intel-openmp 2021.4.0
ipykernel 6.29.5
ipython 9.1.0
ipython_pygments_lexers 1.1.1
jedi 0.19.2
Jinja2 3.1.6
jupyter_client 8.6.3
jupyter_core 5.7.2
kiwisolver 1.4.8
llama_cpp_python 0.3.9
markdown-it-py 3.0.0
MarkupSafe 3.0.2
matplotlib 3.10.1
matplotlib-inline 0.1.7
mdurl 0.1.2
mkl 2021.4.0
mpmath 1.3.0
msgspec 0.19.0
multidict 6.4.3
multiprocess 0.70.16
nest-asyncio 1.6.0
networkx 3.4.2
numpy 1.26.4
ollama 0.4.8
opencv-python 4.11.0.86
packaging 25.0
pandas 2.2.3
parso 0.8.4
pdf2image 1.17.0
peft 0.12.0
pillow 11.2.1
pip 25.1.1
platformdirs 4.3.7
prompt_toolkit 3.0.51
propcache 0.3.1
protobuf 3.20.3
psutil 7.0.0
pure_eval 0.2.3
py-cpuinfo 9.0.0
pyarrow 20.0.0
pydantic 2.11.4
pydantic_core 2.33.2
Pygments 2.19.1
PyMuPDF 1.25.5
pyparsing 3.2.3
PyPDF2 3.0.1
python-dateutil 2.9.0.post0
pytz 2025.2
pywin32 310
PyYAML 6.0.2
pyzbar 0.1.9
pyzmq 26.4.0
qrdet 2.5
qreader 3.16
quadrilateral-fitter 1.12
regex 2024.11.6
requests 2.32.3
rich 14.0.0
safetensors 0.5.3
scipy 1.15.2
seaborn 0.13.2
sentencepiece 0.2.0
setuptools 65.5.0
shapely 2.1.0
shtab 1.7.2
six 1.17.0
sniffio 1.3.1
stack-data 0.6.3
sympy 1.13.1
tbb 2021.13.1
timm 1.0.15
tokenizers 0.21.1
torch 2.6.0+cu124
torchaudio 2.6.0+cu124
torchvision 0.21.0+cu124
tornado 6.4.2
tqdm 4.67.1
traitlets 5.14.3
transformers 4.51.3
triton-windows 3.3.0.post19
trl 0.15.2
typeguard 4.4.2
typing_extensions 4.13.2
typing-inspection 0.4.0
tyro 0.9.20
tzdata 2025.2
ultralytics 8.3.119
ultralytics-thop 2.0.14
unsloth 2025.5.4
unsloth_zoo 2025.5.6
urllib3 2.4.0
wcwidth 0.2.13
wheel 0.45.1
xformers 0.0.29.post3
xxhash 3.5.0
yarl 1.20.0
Below is complete error
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from unsloth import FastLanguageModel
2 import torch
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\unsloth_init_.py:163
158 pass
161 # For Gradio HF Spaces?
162 # if "SPACE_AUTHOR_NAME" not in os.environ and "SPACE_REPO_NAME" not in os.environ:
--> 163 import triton
164 if DEVICE_TYPE == "cuda":
165 libcuda_dirs = lambda: None
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton_init_.py:8
2 version = '3.3.0'
4 # ---------------------------------------
5 # Note: import order is significant here.
6
7 # submodules
----> 8 from .runtime import (
9 autotune,
10 Config,
11 heuristics,
12 JITFunction,
13 KernelInterface,
14 reinterpret,
15 TensorWrapper,
16 OutOfResources,
17 InterpreterError,
18 MockTensor,
19 )
20 from .runtime.jit import jit
21 from .compiler import compile, CompilationError
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\runtime_init_.py:1
----> 1 from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics)
2 from .cache import RedisRemoteCacheBackend, RemoteCacheBackend
3 from .driver import driver
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\runtime\autotuner.py:9
6 import inspect
7 from typing import Dict, Tuple, List, Optional
----> 9 from .jit import KernelInterface
10 from .errors import OutOfResources, PTXASError
11 from .driver import driver
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\runtime\jit.py:12
10 from functools import cached_property
11 from typing import Callable, Generic, Iterable, Optional, TypeVar, Union, overload, Dict, Any, Tuple
---> 12 from ..runtime.driver import driver
13 from types import ModuleType
14 from .._utils import find_paths_if, get_iterable_path
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\runtime\driver.py:1
----> 1 from ..backends import backends
2 from ..backends import DriverBase
5 def _create_driver():
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\backends_init_.py:50
45 backends[name] = Backend(_find_concrete_subclasses(compiler, BaseBackend),
46 _find_concrete_subclasses(driver, DriverBase))
47 return backends
---> 50 backends = _discover_backends()
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\backends_init_.py:43, in _discover_backends()
41 if name.startswith('__'):
42 continue
---> 43 compiler = _load_module(name, os.path.join(root, name, 'compiler.py'))
44 driver = _load_module(name, os.path.join(root, name, 'driver.py'))
45 backends[name] = Backend(_find_concrete_subclasses(compiler, BaseBackend),
46 _find_concrete_subclasses(driver, DriverBase))
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\backends_init_.py:12, in _load_module(name, path)
10 spec = importlib.util.spec_from_file_location(name, path)
11 module = importlib.util.module_from_spec(spec)
---> 12 spec.loader.exec_module(module)
13 return module
File d:\Custom_OCR\OCR\ocr_env\Lib\site-packages\triton\backends\amd\compiler.py:2
1 from triton.backends.compiler import BaseBackend, GPUTarget
----> 2 from triton._C.libtriton import ir, passes, llvm, amd
3 from dataclasses import dataclass
4 from typing import Any, Dict, Tuple
ImportError: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
Anyone have faced this issue and any suggestion
All reactions