Instructions to use TheCommonAI/common-flash-v0.1 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 TheCommonAI/common-flash-v0.1 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 TheCommonAI/common-flash-v0.1:Q4_0 # Run inference directly in the terminal: llama cli -hf TheCommonAI/common-flash-v0.1:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TheCommonAI/common-flash-v0.1:Q4_0 # Run inference directly in the terminal: llama cli -hf TheCommonAI/common-flash-v0.1:Q4_0
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 TheCommonAI/common-flash-v0.1:Q4_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf TheCommonAI/common-flash-v0.1:Q4_0
Use Docker
docker model run hf.co/TheCommonAI/common-flash-v0.1:Q4_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use TheCommonAI/common-flash-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheCommonAI/common-flash-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheCommonAI/common-flash-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TheCommonAI/common-flash-v0.1:Q4_0
- Ollama
How to use TheCommonAI/common-flash-v0.1 with Ollama:
ollama run hf.co/TheCommonAI/common-flash-v0.1:Q4_0
- Unsloth Desktop
- Pi
How to use TheCommonAI/common-flash-v0.1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TheCommonAI/common-flash-v0.1:Q4_0
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": "TheCommonAI/common-flash-v0.1:Q4_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use TheCommonAI/common-flash-v0.1 with Docker Model Runner:
docker model run hf.co/TheCommonAI/common-flash-v0.1:Q4_0
- Lemonade
How to use TheCommonAI/common-flash-v0.1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheCommonAI/common-flash-v0.1:Q4_0
Run and chat with the model
lemonade run user.common-flash-v0.1-Q4_0
List all available models
lemonade list
- Hermes Agent
How to use TheCommonAI/common-flash-v0.1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TheCommonAI/common-flash-v0.1:Q4_0
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 TheCommonAI/common-flash-v0.1:Q4_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TheCommonAI/common-flash-v0.1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TheCommonAI/common-flash-v0.1:Q4_0
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 "TheCommonAI/common-flash-v0.1:Q4_0" \ --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"
Add one-command run, charts and cross-model speeds
Browse files- README.md +41 -0
- assets/speed_by_model.png +0 -0
- assets/speedup_by_workload.png +0 -0
- assets/verify_throughput.png +0 -0
- assets/what_helped.png +0 -0
README.md
CHANGED
|
@@ -7,6 +7,7 @@ tags:
|
|
| 7 |
- draft-model
|
| 8 |
- bonsai
|
| 9 |
- llama.cpp
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Common Flash v0.1
|
|
@@ -18,6 +19,24 @@ A small model proposes tokens and Bonsai checks them in one pass, so the output
|
|
| 18 |
(1,000 completions of at most 192 tokens; rank 32, all linear layers), vocabulary trimmed to Bonsai's 151,669 tokens
|
| 19 |
(llama.cpp needs the draft vocabulary within 128 tokens of the target's), then quantized to Q4_0.
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
## Target model (required pairing)
|
| 22 |
|
| 23 |
This drafter only works with **`Ternary-Bonsai-8B-Q2_0_g64.gguf`** from
|
|
@@ -126,6 +145,28 @@ Speed relative to plain decoding:
|
|
| 126 |
Draft acceptance is about 65% overall but only 33-45% on chat. Run-to-run ratios varied between 1.19x and 1.41x on a busy machine, so treat these as approximate.
|
| 127 |
With greedy decoding every speculative output matched plain decoding. With sampling the random draws differ, so that check does not apply.
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
## Limits
|
| 130 |
|
| 131 |
- Tested on one machine. Older llama.cpp builds or other hardware may not see a speedup.
|
|
|
|
| 7 |
- draft-model
|
| 8 |
- bonsai
|
| 9 |
- llama.cpp
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
---
|
| 12 |
|
| 13 |
# Common Flash v0.1
|
|
|
|
| 19 |
(1,000 completions of at most 192 tokens; rank 32, all linear layers), vocabulary trimmed to Bonsai's 151,669 tokens
|
| 20 |
(llama.cpp needs the draft vocabulary within 128 tokens of the target's), then quantized to Q4_0.
|
| 21 |
|
| 22 |
+
## Run it in one command
|
| 23 |
+
|
| 24 |
+
Needs a recent llama.cpp (`llama-server`, build 1268eda or newer; see Quick start below). This downloads Bonsai 8B and this drafter, then starts a speculative server with a chat page at http://127.0.0.1:8080:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
llama-server \
|
| 28 |
+
-hf prism-ml/Ternary-Bonsai-8B-gguf:Q2_0_g64 \
|
| 29 |
+
-hfd TheCommonAI/common-flash-v0.1 \
|
| 30 |
+
-ngl 99 -ngld 99 -fa on -np 1 -c 4096 \
|
| 31 |
+
--spec-type draft-simple --spec-draft-n-max 3
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
`-hf` fetches the target model, `-hfd` fetches the drafter from this repo. Tested from an empty cache; the first start downloads about 2.7 GB.
|
| 35 |
+
|
| 36 |
+
> **About the "Use this model" button.** Hugging Face generates that snippet itself, and for this repo it would start the drafter alone, which is not useful. Use the command above instead.
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
|
| 40 |
## Target model (required pairing)
|
| 41 |
|
| 42 |
This drafter only works with **`Ternary-Bonsai-8B-Q2_0_g64.gguf`** from
|
|
|
|
| 145 |
Draft acceptance is about 65% overall but only 33-45% on chat. Run-to-run ratios varied between 1.19x and 1.41x on a busy machine, so treat these as approximate.
|
| 146 |
With greedy decoding every speculative output matched plain decoding. With sampling the random draws differ, so that check does not apply.
|
| 147 |
|
| 148 |
+
|
| 149 |
+
### Charts
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
|
| 157 |
+
### Decode speed on the same M3 (plain, llama.cpp 1268eda, `llama-bench` tg128)
|
| 158 |
+
|
| 159 |
+
| Model | File size | tokens/s |
|
| 160 |
+
| --- | ---: | ---: |
|
| 161 |
+
| Ternary Bonsai 1.7B | 0.46 GB | 127 |
|
| 162 |
+
| Ternary Bonsai 2 2B | 0.51 GB | 97 |
|
| 163 |
+
| **Common Flash** (Bonsai 8B + drafter) | 2.3 GB + 0.4 GB | **~49** (36.3 x 1.36) |
|
| 164 |
+
| Ternary Bonsai 2 4B | 1.1 GB | 48 |
|
| 165 |
+
| Ternary Bonsai 8B, plain | 2.1 GB | 36 |
|
| 166 |
+
| Ternary Bonsai 2 9B | 2.4 GB | 28 |
|
| 167 |
+
|
| 168 |
+
The Common Flash row is derived: plain Bonsai 8B speed times the measured 1.36x ratio, not a separate `llama-bench` run. Smaller models are faster but are different, smaller models; the comparison that matters for quality is Bonsai 8B plain against Bonsai 8B with the drafter, which produce the same text.
|
| 169 |
+
|
| 170 |
## Limits
|
| 171 |
|
| 172 |
- Tested on one machine. Older llama.cpp builds or other hardware may not see a speedup.
|
assets/speed_by_model.png
ADDED
|
assets/speedup_by_workload.png
ADDED
|
assets/verify_throughput.png
ADDED
|
assets/what_helped.png
ADDED
|