Instructions to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU 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 IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU 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 IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16 # Run inference directly in the terminal: llama cli -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16 # Run inference directly in the terminal: llama cli -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
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 IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16 # Run inference directly in the terminal: ./llama-cli -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
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 IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Use Docker
docker model run hf.co/IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
- LM Studio
- Jan
- Ollama
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with Ollama:
ollama run hf.co/IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
- Unsloth Desktop
- Pi
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with Docker Model Runner:
docker model run hf.co/IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
- Lemonade
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Run and chat with the model
lemonade run user.Bonsai-27B-GGUF-Colab-Prebuilt-GPU-F16
List all available models
lemonade list
- Hermes Agent
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
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 IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Bonsai-27B (GGUF) โ Run (Q1_0) Under 1 Minute ๐
This repository provides optimized pre-built binaries and configurations to get the Bonsai-27B model up and running on Google Colab or similar GPU environments with acceleration under 1 minute when using the Q1_0 variant.
โก Quick Start
๐ง Setup (run once)
!pip install -q huggingface_hub
import os
from huggingface_hub import hf_hub_download
# --- CONFIGURATION ---
repo_id = "IamPradeep/Bonsai-27B-GGUF-Colab-Prebuilt-GPU"
print("1. Downloading pre-compiled binary package...")
bin_zip_path = hf_hub_download(repo_id=repo_id, filename="llama_bin.tar.gz")
# Extract the binaries into a folder called 'llama_bin'
!mkdir -p ./llama_bin
!tar -xzvf {bin_zip_path} -C ./llama_bin
# Grant executable permissions to the binary
!chmod +x ./llama_bin/llama-cli
print("\n2. Downloading model (this takes <=1 minute for 3.8 GB)...")
model_path = hf_hub_download(repo_id=repo_id, filename="Bonsai-27B-Q1_0.gguf")
# Add the extracted folder to LD_LIBRARY_PATH for dynamic CUDA libraries
os.environ["LD_LIBRARY_PATH"] = f"./llama_bin:{os.environ.get('LD_LIBRARY_PATH', '')}"
๐ค Text Inference
# Run the text model!
system_prompt = "You are a helpful AI assistant."
prompt = "Explain quantum computing in simple terms."
print(f"\n--- Running text inference with Ternary-Bonsai-27B ---\n")
!./llama_bin/llama-cli \
-m "{model_path}" \
-ngl 99 \
-sys "{system_prompt}" \
-p "{prompt}" \
--temp 0.7 \
--top-p 0.95 \
-n 2048
๐๏ธ Vision / Multimodal Inference (Live Upload)
You can also run vision tasks by downloading the vision projector (mmproj) and uploading an image directly inside Google Colab:
from PIL import Image
from google.colab import files
# 1. Download Vision Projector
print("Downloading Vision Projector (~629 MB)...")
mmproj_path = hf_hub_download(repo_id=repo_id, filename="Bonsai-27B-mmproj-Q8_0.gguf")
# 2. Live Image Upload
print("\n" + "="*50)
print("๐ธ PLEASE UPLOAD AN IMAGE FROM YOUR DEVICE:")
print("="*50)
uploaded = files.upload()
if not uploaded:
print("\nโ No file was uploaded!")
else:
# Save the uploaded file path
image_filename = list(uploaded.keys())[0]
image_path = f"./{image_filename}"
print(f"\nโ
Uploaded successfully: {image_filename}")
display(Image.open(image_path))
# 3. Run Multimodal Inference
system_prompt = "You are an expert AI vision assistant. Provide clear, detailed, and accurate descriptions of images."
prompt = "Describe what you see in this image in detail."
print(f"\n๐ค Running Vision Inference on {image_filename}...\n")
!./llama_bin/llama-cli \
-m "{model_path}" \
--mmproj "{mmproj_path}" \
--image "{image_path}" \
-sys "{system_prompt}" \
-p "{prompt}" \
-ngl 99 \
--temp 0.2 \
-n 2048
๐ก Notes
- Model Download Speed: The default
Bonsai-27B-Q1_0.gguffile is ~3.8 GB. Downloading it inside Colab typically takes < 1 minute depending on network throughput. - Other Variants Available: This repository hosts alternative quantizations and vision projector files:
- Language Models:
Bonsai-27B-F16.gguf(53.8 GB),Bonsai-27B-dspark-bf16.gguf(7.29 GB), andBonsai-27B-dspark-Q4_1.gguf(1.79 GB) - Vision Projectors (
mmproj):Bonsai-27B-mmproj-BF16.gguf(931 MB) andBonsai-27B-mmproj-Q8_0.gguf(629 MB)
Simply adjust the filename parameter in hf_hub_download to load your preferred variant.
- Architecture: Uses 1-bit quantization, delivering high reasoning capability while keeping GPU VRAM requirements to a minimum.
๐ค Acknowledgments
Special thanks to PrismML, the original architecture creators behind the revolutionary 1-bit and ternary (1.58-bit precision) Bonsai model families. Their custom quantization methods allow this 27B parameter model to deliver rapid local GPU inference inside a compact ~3.8 GB footprint.
- Downloads last month
- 82
1-bit
4-bit
16-bit