microsoft / BitNet

Official inference framework for 1-bit LLMs
MIT License
9.84k stars 652 forks source link

Install/build process should check and assert the requirements (e.g. clang compiler versions) #34

Open bmerkle opened 6 days ago

bmerkle commented 6 days ago

The readme states some requirements about python, cmake and clang version.

Currently the install/build process does not check if the clang version requirement is satisfied and ubuntu e.g. come with a clang version 14. This can also cause problems, e.g see bug report https://github.com/microsoft/BitNet/issues/30

It would be cool if the install/build process checks the requirements and stops the build process with an error it the version is not satisfied.

algorise commented 4 days ago

Header file seems to be missing in the repo. Getting the following error on clang: Cannot find source file: ../../../../include/bitnet-lut-kernels.h

edsonke commented 4 days ago

@algorise It looks like you need to run setup_env.py at least one time. The header file is automatically generated after running the script with the instruction in README.md

bmerkle commented 4 days ago

@algorise It looks like you need to run setup_env.py at least one time. The header file is automatically generated after running the script with the instruction in README.md

It is a best practice to not include generated files in versioncontrol so i think the behaviour is ok. Running setup once should generate all the necessary files and configuration

eddieoz commented 2 days ago

In my case, the bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" installed clang-18, but didn't replace the clang-14 on my rpi5 debian.

I checked both versions were on /usr/bin, then I uninstalled clang and symlinked the all clang*18 to clang (without -18)

I wrote about the process to make it work: https://www.eddieoz.com/building-bitnet-on-raspberry-pi-5-arm64-2/

bmerkle commented 2 days ago

instead of ln -s manually I would use: update-alternatives

sudo update-alternatives --config clang

eddieoz commented 1 day ago

sudo update-alternatives --config clang

Thank you! I updated my post :)