Instructions to use tdh111/bitnet-b1.58-2B-4T-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tdh111/bitnet-b1.58-2B-4T-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf tdh111/bitnet-b1.58-2B-4T-GGUF # Run inference directly in the terminal: llama cli -hf tdh111/bitnet-b1.58-2B-4T-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tdh111/bitnet-b1.58-2B-4T-GGUF # Run inference directly in the terminal: llama cli -hf tdh111/bitnet-b1.58-2B-4T-GGUF
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf tdh111/bitnet-b1.58-2B-4T-GGUF # Run inference directly in the terminal: ./llama-cli -hf tdh111/bitnet-b1.58-2B-4T-GGUF
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf tdh111/bitnet-b1.58-2B-4T-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf tdh111/bitnet-b1.58-2B-4T-GGUF
Use Docker
docker model run hf.co/tdh111/bitnet-b1.58-2B-4T-GGUF
- LM Studio
- Jan
- vLLM
How to use tdh111/bitnet-b1.58-2B-4T-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tdh111/bitnet-b1.58-2B-4T-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tdh111/bitnet-b1.58-2B-4T-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tdh111/bitnet-b1.58-2B-4T-GGUF
- Ollama
How to use tdh111/bitnet-b1.58-2B-4T-GGUF with Ollama:
ollama run hf.co/tdh111/bitnet-b1.58-2B-4T-GGUF
- Unsloth Desktop
- Docker Model Runner
How to use tdh111/bitnet-b1.58-2B-4T-GGUF with Docker Model Runner:
docker model run hf.co/tdh111/bitnet-b1.58-2B-4T-GGUF
- Lemonade
How to use tdh111/bitnet-b1.58-2B-4T-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tdh111/bitnet-b1.58-2B-4T-GGUF
Run and chat with the model
lemonade run user.bitnet-b1.58-2B-4T-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
The IQ2_BN and IQ2_BN_R4 version of microsoft/bitnet-b1.58-2B-4T-gguf for use with ik_llama.cpp.
I recommend the IQ2_BN_R4 version but you use -rtr on IQ2_BN to convert on runtime.
The chat template in the model looks incorrect (I did not change it, this is from the original Microsoft GGUF).
An example of correct usage from their transformers PR:
<|begin_of_text|>User: Hey, are you conscious? Can you talk to me?<|eot_id|>Assistant:
I was able to follow the example above and it worked for multi-turn conversations.
With the more general template (sourced from the paper) being:
<|begin_of_text|>System: {system_message}<|eot_id|> User: {user_message_1}<|eot_id|> Assistant: {assistant_message_1}<|eot_id|> User: {user_message_2}<|eot_id|> Assistant: {assistant_message_2}<|eot_id|>
- Downloads last month
- 423
We're not able to determine the quantization variants.
Model tree for tdh111/bitnet-b1.58-2B-4T-GGUF
Base model
microsoft/bitnet-b1.58-2B-4T