unslothai / unsloth

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

Linker Error with Clang.exe #806

Open jacker31 opened 1 month ago

jacker31 commented 1 month ago

So when I tried to run the Unsloth after a fresh setup, I to the LNK1120 error.

LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\lib\x86\libcmt.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'

I have x64 installed for MSVC++, but it is still looking for x86.

danielhanchen commented 1 month ago

So sorry on the slowness! Oh Windows? Hmmm tbh I'm not too sure - how did you go about installing Unsloth in Windows?

jacker31 commented 1 month ago

I primarily followed the guide by https://x.com/mejia_petit/status/1763391797575741707, fought a little with libraries and managed to load everything in.

This happened when i tried to load it on Windows 11 with MSVC 2022, and execute the sample script on the github page for testing, but for some reason, it was calling for x86 lib instead of x64 lib (though both were installed).

There were also issues where it was calling for x86 Python Clang, and CUDA while the system are x64.

No issue on WSL2 with Ubuntu 22 LTS tho.

danielhanchen commented 1 month ago

So sorry on the delay! Hmm sadly Unsloth still officially does not support Windows, so issues will prop up in the meantime - sorry :(