Text Generation
GGUF
English
multilingual
llama.cpp
cpu-inference
q4_k_m
qwen3
offline
local-first
low-end-hardware
document-generation
conversational
Instructions to use hkblockchaintechnology/tiny-agent-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 hkblockchaintechnology/tiny-agent-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 hkblockchaintechnology/tiny-agent-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
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 hkblockchaintechnology/tiny-agent-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
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 hkblockchaintechnology/tiny-agent-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
Use Docker
docker model run hf.co/hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use hkblockchaintechnology/tiny-agent-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hkblockchaintechnology/tiny-agent-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": "hkblockchaintechnology/tiny-agent-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
- Ollama
How to use hkblockchaintechnology/tiny-agent-gguf with Ollama:
ollama run hf.co/hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
- Unsloth Desktop
- Pi
How to use hkblockchaintechnology/tiny-agent-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
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": "hkblockchaintechnology/tiny-agent-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use hkblockchaintechnology/tiny-agent-gguf with Docker Model Runner:
docker model run hf.co/hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
- Lemonade
How to use hkblockchaintechnology/tiny-agent-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
Run and chat with the model
lemonade run user.tiny-agent-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use hkblockchaintechnology/tiny-agent-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
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 hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use hkblockchaintechnology/tiny-agent-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hkblockchaintechnology/tiny-agent-gguf:Q4_K_M
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 "hkblockchaintechnology/tiny-agent-gguf:Q4_K_M" \ --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"
Update model card
Browse files
README.md
CHANGED
|
@@ -2,70 +2,201 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
library_name: llama.cpp
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- gguf
|
|
|
|
| 8 |
- cpu-inference
|
|
|
|
| 9 |
- qwen3
|
| 10 |
- offline
|
| 11 |
- local-first
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
that runs on CPU-only, no-GPU machines.
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
entirely offline with no cloud API and no GPU. Weights hosted here are chosen so
|
| 25 |
-
that redistribution is legally clean: **Apache-2.0 only**.
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
|
| 30 |
-
|---|---|---|
|
| 31 |
-
|
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
## Related
|
| 70 |
|
| 71 |
-
* Project
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
+
- multilingual
|
| 6 |
+
base_model:
|
| 7 |
+
- Qwen/Qwen3-1.7B
|
| 8 |
+
base_model_relation: quantized
|
| 9 |
library_name: llama.cpp
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
quantized_by: hkblockchaintechnology
|
| 12 |
tags:
|
| 13 |
- gguf
|
| 14 |
+
- llama.cpp
|
| 15 |
- cpu-inference
|
| 16 |
+
- q4_k_m
|
| 17 |
- qwen3
|
| 18 |
- offline
|
| 19 |
- local-first
|
| 20 |
+
- low-end-hardware
|
| 21 |
+
- document-generation
|
| 22 |
---
|
| 23 |
|
| 24 |
+
# tiny-agent-gguf
|
| 25 |
+
|
| 26 |
+
Quantized language models for **Tiny Agent** β an offline agent that researches
|
| 27 |
+
the web and writes Word documents and PowerPoint decks on a computer with **no
|
| 28 |
+
GPU and no cloud API**.
|
| 29 |
+
|
| 30 |
+
These files are **quantizations of existing Apache-2.0 models**, not new models.
|
| 31 |
+
Nothing here is fine-tuned: we convert and quantize, so the knowledge, biases
|
| 32 |
+
and limitations are inherited unchanged from the base model.
|
| 33 |
|
| 34 |
+
## TL;DR
|
|
|
|
| 35 |
|
| 36 |
+
| | |
|
| 37 |
+
|---|---|
|
| 38 |
+
| What it is | Qwen3-1.7B converted to GGUF and quantized to 4-bit |
|
| 39 |
+
| What it's for | Filling short, schema-constrained JSON slots in the Tiny Agent pipeline |
|
| 40 |
+
| Licence | Apache-2.0 β free to redistribute with a product |
|
| 41 |
+
| Runs on | CPU only, no GPU. ~1.2 GB RAM for the 4-bit build |
|
| 42 |
+
| Speed | ~10 tokens/second on a 2014-era 4-core desktop |
|
| 43 |
+
| Not for | Being asked to "write me a report" in a single prompt |
|
| 44 |
|
| 45 |
+
## What it can do
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
Measured by actually running it β these are observed behaviours, not claims:
|
| 48 |
|
| 49 |
+
| Task | Verdict | Notes |
|
| 50 |
+
|---|---|---|
|
| 51 |
+
| Return strictly valid JSON matching a schema | β
reliable | Enforced by a llama.cpp grammar, so it is structurally impossible to emit malformed JSON |
|
| 52 |
+
| Plan a document outline (3β6 sections) | β
reliable | Produces sensible, ordered headings |
|
| 53 |
+
| Write 1β3 paragraphs of grammatical prose on a topic | β
good | Coherent and readable; occasionally generic |
|
| 54 |
+
| Condense source material into 3β5 short bullets | β
good | Best when given explicit research notes |
|
| 55 |
+
| Follow small constraints ("under 12 words", "no markdown") | β
usually | Occasionally needs the constraint repeated |
|
| 56 |
+
| Write a *whole* multi-page document in one pass | β no | It drifts, repeats and loses structure β see the design note below |
|
| 57 |
+
| Be factually accurate from memory alone | β no | It will invent plausible specifics. Grounding in retrieved text is what makes output trustworthy |
|
| 58 |
+
| Do arithmetic, analysis or comparisons | β no | Use Python for that |
|
| 59 |
+
| Cite its sources unprompted | β no | Citations are attached by the pipeline, not the model |
|
| 60 |
+
| Keep a consistent voice across many sections | β οΈ partial | Sections are generated independently, so tone can drift |
|
| 61 |
+
|
| 62 |
+
## How Tiny Agent uses it
|
| 63 |
+
|
| 64 |
+
The model is never asked to write a document. It is asked one small question at
|
| 65 |
+
a time, and deterministic Python assembles the result:
|
| 66 |
+
|
| 67 |
+
```
|
| 68 |
+
1. interpret "what does the user want?" -> RequestKind
|
| 69 |
+
2. plan "what sections, covering what?" -> ReportPlan
|
| 70 |
+
3. research "what do the sources actually say?" -> retrieved text (not the model)
|
| 71 |
+
4. draft "write just this section, given facts" -> SectionDraft (one call per section)
|
| 72 |
+
5. assemble deterministic Python -> .docx / .pptx
|
| 73 |
+
```
|
| 74 |
|
| 75 |
+
Each step is a JSON-schema-constrained call. For example, step 4's contract is
|
| 76 |
+
literally this, handed to llama.cpp as a grammar:
|
| 77 |
+
|
| 78 |
+
```json
|
| 79 |
+
{
|
| 80 |
+
"type": "object",
|
| 81 |
+
"properties": {
|
| 82 |
+
"paragraphs": {
|
| 83 |
+
"type": "array",
|
| 84 |
+
"items": {"type": "string"}
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"required": ["paragraphs"]
|
| 88 |
+
}
|
| 89 |
+
```
|
| 90 |
|
| 91 |
+
This is why a 1.7B model is usable for a real task: the hard part (structure,
|
| 92 |
+
formatting, document assembly) is handled by code, and the model only supplies
|
| 93 |
+
short strings where a small model is genuinely competent.
|
| 94 |
|
| 95 |
+
## Hardware and measured speed
|
| 96 |
|
| 97 |
+
Reference machine β deliberately weak, and the actual development target:
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
+
| | |
|
| 100 |
+
|---|---|
|
| 101 |
+
| CPU | Intel Core i5-4460 (Haswell, 4 cores / 4 threads, AVX2) |
|
| 102 |
+
| RAM | 16 GB DDR3-1333 |
|
| 103 |
+
| GPU | none used |
|
| 104 |
+
| Storage | 7200 rpm HDD |
|
| 105 |
|
| 106 |
+
| Model | Quant | File size | Cold load | Prompt eval | **Generation** |
|
| 107 |
+
|---|---|---|---|---|---|
|
| 108 |
+
| Qwen3-1.7B | Q4_K_M | ~1.1 GB | 25.1 s | 444 tok/s | **10.0 tok/s** |
|
| 109 |
+
| Qwen3-0.6B | Q4_K_M | ~0.5 GB | 12.0 s | 994 tok/s | **23.6 tok/s** |
|
| 110 |
|
| 111 |
+
Practical consequences:
|
| 112 |
+
|
| 113 |
+
* **Cold load is expensive on a spinning disk** (~25 s for 1.7B). Keep the model
|
| 114 |
+
resident between requests rather than reloading per call.
|
| 115 |
+
* Use `-t 4` on a 4-core CPU. More threads than physical cores makes it slower.
|
| 116 |
+
* Qwen3 is a reasoning model. Left alone it spends most of its budget on hidden
|
| 117 |
+
thinking tokens, so **disable thinking** (`think=false`, or `--reasoning-budget 0`).
|
| 118 |
+
* A grounded 3-section report takes ~140 s end to end. That is acceptable for a
|
| 119 |
+
"generate document" button, but only with progress reporting.
|
| 120 |
+
|
| 121 |
+
## Quick start
|
| 122 |
+
|
| 123 |
+
**llama.cpp server** (OpenAI-compatible, supports JSON-schema constrained output):
|
| 124 |
|
| 125 |
```bash
|
| 126 |
+
llama-server -m qwen3-1.7b-Q4_K_M.gguf -c 4096 -t 4 --port 8080
|
| 127 |
```
|
| 128 |
|
| 129 |
+
**llama.cpp CLI:**
|
| 130 |
|
| 131 |
```bash
|
| 132 |
+
llama-cli -m qwen3-1.7b-Q4_K_M.gguf -c 4096 -t 4 \
|
| 133 |
+
-p "Return only JSON: {\"heading\": str, \"paragraphs\": [str]} for a section about heat pumps."
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
**Ollama** (point it at the local file):
|
| 137 |
+
|
| 138 |
+
```bash
|
| 139 |
+
ollama pull <this-repo>/qwen3-1.7b-Q4_K_M.gguf
|
| 140 |
```
|
| 141 |
|
| 142 |
+
A CPU-only `llama.cpp` Windows build is about **19 MB** and needs no GPU, CUDA
|
| 143 |
+
toolkit or Python environment β that is the intended way to ship this.
|
| 144 |
+
|
| 145 |
+
## Prompting notes for a model this size
|
| 146 |
+
|
| 147 |
+
1. **One question per call.** Asking for several things at once is where small
|
| 148 |
+
models fall apart.
|
| 149 |
+
2. **Constrain the output shape.** Use a JSON schema or GBNF grammar. It removes
|
| 150 |
+
an entire class of parsing failures.
|
| 151 |
+
3. **Disable thinking.** Qwen3 will otherwise spend its whole budget reasoning.
|
| 152 |
+
4. **Give it the facts.** Put retrieved text in the prompt; it cannot supply
|
| 153 |
+
accurate specifics from memory.
|
| 154 |
+
5. **Ask for less text.** 2β3 short paragraphs per section works; "write a
|
| 155 |
+
detailed 2000-word report" does not.
|
| 156 |
+
6. **Expect and clean up artefacts.** It adds list numbering to headings and
|
| 157 |
+
sometimes leaks markdown into prose fields. Strip these deterministically
|
| 158 |
+
during assembly rather than fighting them with prompt wording.
|
| 159 |
+
|
| 160 |
+
## Limitations
|
| 161 |
+
|
| 162 |
+
* **Hallucination.** Without grounding, specifics (figures, dates, product
|
| 163 |
+
names) are unreliable and often invented. Tiny Agent mitigates this by injecting
|
| 164 |
+
retrieved web text and attaching a source list, but it does not eliminate it.
|
| 165 |
+
* **Inherited knowledge cutoff and biases.** Because this is a quantization, the
|
| 166 |
+
base model's training data, cutoff and biases apply unchanged.
|
| 167 |
+
* **Language.** The base model is multilingual, but the pipeline prompts and all
|
| 168 |
+
validation were done in English.
|
| 169 |
+
* **Repetition.** Sections written in separate calls sometimes restate the same
|
| 170 |
+
point. Human editing is expected.
|
| 171 |
+
* **Not a general chat model.** It is tuned here for structured slot-filling, not
|
| 172 |
+
for open-ended conversation.
|
| 173 |
+
* **Quantization degrades quality slightly** versus the full-precision base
|
| 174 |
+
model. 4-bit is the point where quality and speed balance best on this class
|
| 175 |
+
of hardware.
|
| 176 |
+
|
| 177 |
+
## Training data
|
| 178 |
+
|
| 179 |
+
No training or fine-tuning was performed. This repository contains quantized
|
| 180 |
+
conversions of:
|
| 181 |
+
|
| 182 |
+
* [`Qwen/Qwen3-1.7B`](https://huggingface.co/Qwen/Qwen3-1.7B)
|
| 183 |
+
* [`Qwen/Qwen3-0.6B`](https://huggingface.co/Qwen/Qwen3-0.6B)
|
| 184 |
+
|
| 185 |
+
Refer to the base model cards for training data, evaluation results and
|
| 186 |
+
limitations.
|
| 187 |
+
|
| 188 |
+
Why these models: both are **Apache-2.0**, so they can be redistributed with a
|
| 189 |
+
commercial product without additional conditions. Llama, Gemma and several other
|
| 190 |
+
otherwise-capable small models are deliberately **not** bundled, because their
|
| 191 |
+
licences carry redistribution terms that are unsuitable for shipping to end
|
| 192 |
+
users.
|
| 193 |
+
|
| 194 |
+
## License and attribution
|
| 195 |
+
|
| 196 |
+
Apache-2.0, inherited from the base models. Copyright in the base weights
|
| 197 |
+
belongs to the Qwen team; these are derivative quantizations redistributed under
|
| 198 |
+
the same licence.
|
| 199 |
|
| 200 |
## Related
|
| 201 |
|
| 202 |
+
* Project source, benchmarks and generated documents: [`hkblockchaintechnology/tiny-agent`](https://huggingface.co/datasets/hkblockchaintechnology/tiny-agent)
|