Instructions to use apothic/bonsai-8B-1bit-turboquant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use apothic/bonsai-8B-1bit-turboquant with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="apothic/bonsai-8B-1bit-turboquant", filename="models/gguf/8B/Bonsai-8B.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use apothic/bonsai-8B-1bit-turboquant with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf apothic/bonsai-8B-1bit-turboquant # Run inference directly in the terminal: llama-cli -hf apothic/bonsai-8B-1bit-turboquant
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf apothic/bonsai-8B-1bit-turboquant # Run inference directly in the terminal: llama-cli -hf apothic/bonsai-8B-1bit-turboquant
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 apothic/bonsai-8B-1bit-turboquant # Run inference directly in the terminal: ./llama-cli -hf apothic/bonsai-8B-1bit-turboquant
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 apothic/bonsai-8B-1bit-turboquant # Run inference directly in the terminal: ./build/bin/llama-cli -hf apothic/bonsai-8B-1bit-turboquant
Use Docker
docker model run hf.co/apothic/bonsai-8B-1bit-turboquant
- LM Studio
- Jan
- Ollama
How to use apothic/bonsai-8B-1bit-turboquant with Ollama:
ollama run hf.co/apothic/bonsai-8B-1bit-turboquant
- Unsloth Studio
How to use apothic/bonsai-8B-1bit-turboquant with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for apothic/bonsai-8B-1bit-turboquant to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for apothic/bonsai-8B-1bit-turboquant to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for apothic/bonsai-8B-1bit-turboquant to start chatting
- Pi
How to use apothic/bonsai-8B-1bit-turboquant with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf apothic/bonsai-8B-1bit-turboquant
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "apothic/bonsai-8B-1bit-turboquant" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use apothic/bonsai-8B-1bit-turboquant with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf apothic/bonsai-8B-1bit-turboquant
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default apothic/bonsai-8B-1bit-turboquant
Run Hermes
hermes
- Docker Model Runner
How to use apothic/bonsai-8B-1bit-turboquant with Docker Model Runner:
docker model run hf.co/apothic/bonsai-8B-1bit-turboquant
- Lemonade
How to use apothic/bonsai-8B-1bit-turboquant with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull apothic/bonsai-8B-1bit-turboquant
Run and chat with the model
lemonade run user.bonsai-8B-1bit-turboquant-{{QUANT_TAG}}List all available models
lemonade list
Bonsai 1-Bit TurboQuant
This repository bundles the Bonsai-8B GGUF checkpoint and the launcher scripts needed to run it with the TurboQuant-enabled llama.cpp fork.
TurboQuant does not change the 1-bit model weights. It changes the KV cache format at runtime, which is what reduces VRAM usage.
What is included
models/gguf/8B/Bonsai-8B.ggufscripts/common.shscripts/run_llama.shscripts/start_llama_server.shscripts/start_openwebui.shscripts/download_models.sh
Quick Start
Clone this repo and the TurboQuant llama.cpp fork side by side:
git clone https://github.com/Apothic-AI/bonsai-turboquant.git
git clone https://github.com/Apothic-AI/llama.cpp-1bit-turboquant.git ../llama.cpp-1bit-turboquant
cd bonsai-turboquant
Build the forked llama.cpp checkout with CUDA:
cd ../llama.cpp-1bit-turboquant
cmake -S . -B build-tbq-cuda -DGGML_CUDA=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_TOOLS=ON
cmake --build build-tbq-cuda -j
cd ../bonsai-turboquant
Run Bonsai through the TurboQuant-enabled server:
BONSAI_LLAMA_BIN_DIR=../llama.cpp-1bit-turboquant/build-tbq-cuda/bin \
BONSAI_CACHE_TYPE_K=tbq4_0 \
BONSAI_CACHE_TYPE_V=tbq3_0 \
./scripts/start_llama_server.sh
The same override works for direct prompts:
BONSAI_LLAMA_BIN_DIR=../llama.cpp-1bit-turboquant/build-tbq-cuda/bin \
BONSAI_CACHE_TYPE_K=tbq4_0 \
BONSAI_CACHE_TYPE_V=tbq3_0 \
./scripts/run_llama.sh -p "Who are you?"
If you want the browser UI, start ./scripts/start_openwebui.sh after the server is running.
To fetch the 4B or 1.7B checkpoints later, use ./scripts/download_models.sh.
Notes
- This repo includes the 8B GGUF only.
- Set
BONSAI_MODELto8Bunless you have added additional model downloads locally. - The
llama.cppfork contains the TurboQuant runtime support.
- Downloads last month
- 293
We're not able to determine the quantization variants.