Skip to content

ArrivedAditya/BitNet

 
 

Repository files navigation

Bitnet.cpp from Microsoft with NLP and RAG Features

License: MIT version

Information

Kernels use in LLM model

  • I2_S for x86, x86_64 cpus.
  • TL1
  • TL2

Model that is supported to use in this branch

Installation

Requirements

  • python>=3.9
  • cmake>=3.22
  • clang>=18
  • conda (highly recommend) e.g., miniforge, miniconda.

Operating System Instruction for Fulling Requirments

For Windows users, its best use wsl for this thing and install linux distro like.

For Debian/Ubuntu or LTS Linux distro users

  • Packages respostory like llvm

      `bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"`
    

Build from source

  1. Clone the repo
git clone --recursive https://github.com/microsoft/BitNet.git
cd BitNet
  1. Install the dependencies
# (Recommended) Create a new conda environment
conda create -n bitnet-cpp python=3.9
conda activate bitnet-cpp

pip install -r requirements.txt
  1. Build the project
# 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

## Usage
Simple, run run.py 

### Customize
Simple edit run.py

About

A fork of official inference framework for 1-bit LLMs thats includes additional scripts to enhance the experience.

Resources

License

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 53.0%
  • Python 46.1%
  • Other 0.9%