Instructions to use amshimba/Cbot-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 amshimba/Cbot-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 amshimba/Cbot-GGUF # Run inference directly in the terminal: llama cli -hf amshimba/Cbot-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf amshimba/Cbot-GGUF # Run inference directly in the terminal: llama cli -hf amshimba/Cbot-GGUF
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 amshimba/Cbot-GGUF # Run inference directly in the terminal: ./build/bin/llama cli -hf amshimba/Cbot-GGUF
Use Docker
docker model run hf.co/amshimba/Cbot-GGUF
- Llama new
- LM Studio
- Jan
- vLLM
How to use amshimba/Cbot-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amshimba/Cbot-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": "amshimba/Cbot-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amshimba/Cbot-GGUF
- Ollama
How to use amshimba/Cbot-GGUF with Ollama:
ollama run hf.co/amshimba/Cbot-GGUF
- Unsloth Desktop
- Docker Model Runner
How to use amshimba/Cbot-GGUF with Docker Model Runner:
docker model run hf.co/amshimba/Cbot-GGUF
- Lemonade
How to use amshimba/Cbot-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull amshimba/Cbot-GGUF
Run and chat with the model
lemonade run user.Cbot-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Cbot, compiled into transformer weights
Cbot is a rule-based chatbot
in C. It uses expert modules and an arbiter in the style of PyBot, and has
no neural network. These GGUF files are Cbot's rules compiled into a
one-block GPT-2 by Cbot's c2w tool. Nothing is trained: every weight
is set by construction from the rules, lexicon, knowledge base and replies.
They exist to show what a 1.5 MB C program costs as dense matrices, and
that an ordinary LLM engine runs it.
cbot.gguf |
cbot-flash.gguf |
|
|---|---|---|
| source variant | cbot (full knowledge base) | cbot-flash (facts only) |
| rules compiled | 5861 | 3552 |
| n_embd (= attention heads, size 1) | 2400 | 2080 |
| n_ff | 24800 | 17280 |
| vocab | 8948 | 6326 |
| parameters | 186.3 M (9.4% nonzero) | 116.6 M (10.7% nonzero) |
| file (f16) | 373 MB | 233 MB |
| size vs the C binary | 246x (binary: 1.52 MB) | 158x (binary: 1.48 MB) |
Run
llama-cli -m cbot.gguf -fa on -c 256 -ub 32 --temp 0 -st -p "what is the capital of france"
The capital of France is Paris.
-fa onis required. With attention heads of size 1, llama.cpp's non-flash attention path aborts while building the graph.- One turn per conversation (
-st). The model ignores order and history, so earlier turns left in the context would trigger rules too. --temp 0always gives the first variant of a reply. With sampling, variants of the same reply have equal logits and are picked at random, as Cbot itself does.
How it works
- Prompt format: the chat template writes
<|bos|> text<|bot|>. The model first emits a control token naming the chosen reply (the intent), then the reply text, then<|end|>. - Residual dimensions: one per rule element: a word, a set of alternatives, a word class, or a number.
- Attention: each element has a head of size 1 that asks "does the prompt contain it?".
- Rule neurons: one FFN neuron per rule ANDs its elements and writes the rule's rank into its reply's logit. The sampler's argmax is the arbiter.
- Speech neurons: one per reply token maps (reply, current token) to the next token.
- Tokenizer: llama.cpp's
rwkvgreedy longest match over every byte, the words the rules use (" word", " Word") and the reply pieces.
What it can and can't do
- Compiles: everything that depends only on the current message: small talk, safety replies, jokes, facts (capitals, authors, languages, currencies, chemical elements, continents), definitions and the Q&A table.
- Doesn't compile: arithmetic and unit conversion on arbitrary numbers, the clock, memory of earlier turns, and replies that quote the user. Use the Space for the whole bot.
- Looser matching than Cbot: rules match their words in any order, there is no spell correction, and a word the vocab lacks counts as nothing.
Checks
Each eval*.tsv line holds: set, prompt, the replies Cbot accepts
(separated by 0x1f), and the compiled program's reply. There is one
canonical prompt per sampled rule, plus every input of Cbot's golden test
transcripts.
| cbot | cbot-flash | |
|---|---|---|
| network = compiled program, in llama.cpp | 413/413 | 415/415 |
| network = compiled program, c2w's C reference, all rules | 5861/5861 + 119/119 golden | 3552/3552 + 119/119 |
| same reply as Cbot, one prompt per rule | 98.5% | 97.8% |
| same reply as Cbot, golden inputs | 45/119 | 48/119 |
Most golden inputs exercise the modules that don't compile. For 46 of them (49 for flash), Cbot's reply is one the model can produce, and it matches on all but one.
Measured speed in llama.cpp on 4 CPU cores: about 34 tokens/s for cbot and 55 for cbot-flash.
- Downloads last month
- 174
We're not able to determine the quantization variants.