Python
[WSL2] bitnet llm 설치해보기
앗사비
2025. 5. 20. 14:24
728x90
https://github.com/microsoft/BitNet
# 사전 준비
sudo apt update && sudo apt install -y clang cmake
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ~/Miniconda3-latest-Linux-x86_64.sh
# 터미널 재시작
# Clone the repo
git clone --recursive https://github.com/microsoft/BitNet.git && cd BitNet
# (Recommended) Create a new conda environment
conda create -n bitnet-cpp python=3.9 && conda activate bitnet-cpp
pip install -r requirements.txt
# Manually download the model and run with local path
huggingface-cli download microsoft/BitNet-b1.58-2B-4T-gguf --local-dir models/BitNet-b1.58-2B-4T
python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
# Run inference with the quantized model
python run_inference.py -m models/BitNet-b1.58-2B-4T/ggml-model-i2_s.gguf -p "You are a helpful assistant" -cnv
# 터미널 재실행 후 다시 사용하려면
conda activate bitnet-cpp && cd BitNet && python run_inference.py -m models/BitNet-b1.58-2B-4T/ggml-model-i2_s.gguf -p "You are a helpful assistant" -cnv
---
wsl2 초기화
wsl --unregister Ubuntu
wsl --install
728x90