Instructions to use zotowata/bonsai2-dflash2-fastfork 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 zotowata/bonsai2-dflash2-fastfork 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 zotowata/bonsai2-dflash2-fastfork # Run inference directly in the terminal: llama cli -hf zotowata/bonsai2-dflash2-fastfork
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf zotowata/bonsai2-dflash2-fastfork # Run inference directly in the terminal: llama cli -hf zotowata/bonsai2-dflash2-fastfork
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf zotowata/bonsai2-dflash2-fastfork # Run inference directly in the terminal: ./build/bin/llama cli -hf zotowata/bonsai2-dflash2-fastfork
Use Docker
docker model run hf.co/zotowata/bonsai2-dflash2-fastfork
- Llama new
- LM Studio
- Jan
- Ollama
How to use zotowata/bonsai2-dflash2-fastfork with Ollama:
ollama run hf.co/zotowata/bonsai2-dflash2-fastfork
- Unsloth Desktop
- Pi
How to use zotowata/bonsai2-dflash2-fastfork with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zotowata/bonsai2-dflash2-fastfork
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "zotowata/bonsai2-dflash2-fastfork" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use zotowata/bonsai2-dflash2-fastfork with Docker Model Runner:
docker model run hf.co/zotowata/bonsai2-dflash2-fastfork
- Lemonade
How to use zotowata/bonsai2-dflash2-fastfork with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zotowata/bonsai2-dflash2-fastfork
Run and chat with the model
lemonade run user.bonsai2-dflash2-fastfork-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use zotowata/bonsai2-dflash2-fastfork with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zotowata/bonsai2-dflash2-fastfork
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:9931/v1 hermes config set model.default zotowata/bonsai2-dflash2-fastfork
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use zotowata/bonsai2-dflash2-fastfork with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zotowata/bonsai2-dflash2-fastfork
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:9931/v1 \ --custom-model-id "zotowata/bonsai2-dflash2-fastfork" \ --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"
Download scripts/bench_prefill2.py from zotowata/bonsai2-dflash2-fastfork: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/zotowata/bonsai2-dflash2-fastfork/resolve/main/scripts/bench_prefill2.py
- Command line
-
hf download hf://zotowata/bonsai2-dflash2-fastfork/scripts/bench_prefill2.py
-
curl -L -o bench_prefill2.py https://huggingface.co/zotowata/bonsai2-dflash2-fastfork/resolve/main/scripts/bench_prefill2.py
2.03 kB
| #!/usr/bin/env python3 | |
| """Second distinct long prompt: real prefill rate, no graph-capture cost.""" | |
| import json, time, urllib.request | |
| URL = "http://127.0.0.1:8001/v1/chat/completions" | |
| def make_prompt(seed): | |
| facts = [ | |
| "A ring buffer owns its storage and never reallocates during operation. ", | |
| "The backpressure policy drops oldest frames when the watermark is exceeded. ", | |
| "Lock-free slots are handed off via acquire/release fences on two indices. ", | |
| "The telemetry sink batches spans and flushes on size or interval bounds. ", | |
| ] | |
| body_txt = "".join(facts[(i + seed) % 4] for i in range(40)) | |
| system = ("You are a senior systems engineer. Technical context: " + body_txt + | |
| "Answer concisely with code only, no prose.") | |
| return [ | |
| {"role": "system", "content": system}, | |
| {"role": "user", "content": "Write the flush function in Rust."}, | |
| ] | |
| def run(seed): | |
| body = {"messages": make_prompt(seed), "max_tokens": 8, "temperature": 0, | |
| "stream": True, "chat_template_kwargs": {"enable_thinking": False}} | |
| req = urllib.request.Request(URL, data=json.dumps(body).encode(), | |
| headers={"Content-Type": "application/json"}) | |
| timings = None | |
| with urllib.request.urlopen(req, timeout=300) as resp: | |
| for raw in resp: | |
| line = raw.decode(errors="replace").strip() | |
| if not line.startswith("data:"): | |
| continue | |
| p = line[5:].strip() | |
| if p == "[DONE]": | |
| break | |
| try: | |
| j = json.loads(p) | |
| except Exception: | |
| continue | |
| if "timings" in j: | |
| timings = j["timings"] | |
| return timings | |
| # two distinct prompts: first pays any capture, second is the clean measurement | |
| t1 = run(0) | |
| print("warmup:", t1["prompt_n"], "tokens @", round(t1["prompt_per_second"], 1), "t/s") | |
| t2 = run(2) | |
| print("measured:", t2["prompt_n"], "tokens @", round(t2["prompt_per_second"], 1), "t/s") | |