microsoft / BitNet

Official inference framework for 1-bit LLMs
MIT License
11.39k stars 768 forks source link

Can't build on Windows 11 #100

Closed sstock2005 closed 2 weeks ago

sstock2005 commented 3 weeks ago

Followed steps on README, result:

(bitnet-cpp) C:\Users\sstoc\OneDrive\bitnet\BitNet>python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s
INFO:root:Compiling the code using CMake.
ERROR:root:Error occurred while running command: Command '['cmake', '-B', 'build', '-DBITNET_X86_TL2=ON', '-T', 'ClangCL']' returned non-zero exit status 1., check details in logs\generate_build_files.log

(bitnet-cpp) C:\Users\sstoc\OneDrive\bitnet\BitNet>cat logs\generate_build_files.log
CMake Error at CMakeLists.txt:2 (project):
  Generator

    Unix Makefiles

  does not support toolset specification, but toolset

    ClangCL

  was specified.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
grctest commented 3 weeks ago

I got it working on windows 11 by installing visual studio community 2022, it required modifying the install with the following extensions:

Image

And on the right tick clang: Image

After doing that & installing conda I was able to build on windows 11