Instructions to use n4ze3m/Qwen3.5-4B-Hmm 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 n4ze3m/Qwen3.5-4B-Hmm 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 n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M # Run inference directly in the terminal: llama cli -hf n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M # Run inference directly in the terminal: llama cli -hf n4ze3m/Qwen3.5-4B-Hmm: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 n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf n4ze3m/Qwen3.5-4B-Hmm: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 n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
Use Docker
docker model run hf.co/n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use n4ze3m/Qwen3.5-4B-Hmm with Ollama:
ollama run hf.co/n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
- Unsloth Desktop
- Pi
How to use n4ze3m/Qwen3.5-4B-Hmm with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf n4ze3m/Qwen3.5-4B-Hmm: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": "n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use n4ze3m/Qwen3.5-4B-Hmm with Docker Model Runner:
docker model run hf.co/n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
- Lemonade
How to use n4ze3m/Qwen3.5-4B-Hmm with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.5-4B-Hmm-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use n4ze3m/Qwen3.5-4B-Hmm with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf n4ze3m/Qwen3.5-4B-Hmm: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 n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use n4ze3m/Qwen3.5-4B-Hmm with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf n4ze3m/Qwen3.5-4B-Hmm: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 "n4ze3m/Qwen3.5-4B-Hmm: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"
Hmm (Qwen3.5-4B)
Hmm is a small open model that answers questions about your data with probabilities instead of text. You give it a state (any text or JSON) and a few typed questions, it gives back a yes/no probability, a choice or a score.
It is a fine-tuned Qwen3.5-4B. Code, local server and training scripts: github.com/n4ze3m/hmm
Note: This is a fun experiment. Hmm is nowhere near the quality of Jev from TypeSafe and it is not affiliated with TypeSafe in any way. The local server just follows the same request format so it is easy to try.
Files
| File | Size | Description |
|---|---|---|
Qwen3.5-4B-Hmm-Q4_K_M.gguf |
2.7 GB | Recommended. Same accuracy as the full model in my tests |
Qwen3.5-4B-Hmm-Q8_0.gguf |
4.5 GB | 8-bit |
Qwen3.5-4B-Hmm-bf16.gguf |
8.4 GB | Full precision |
lora/ |
170 MB | The LoRA adapter, if you want to use it with transformers + peft |
Usage
Hmm does not generate text, it reads the probability of the option letters on the first token. The easiest way to use it is the small server from the GitHub repo, which does this for you.
- Start the model
llama-server -hf n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M -np 4 --port 8080
or with Ollama (v0.12.11 or newer)
ollama pull hf.co/n4ze3m/Qwen3.5-4B-Hmm:Q4_K_M
- Start the server
git clone https://github.com/n4ze3m/hmm.git
cd hmm/server
bun run start
- Ask something
curl http://localhost:8787/v1/systemone -d '{
"state": "Help! My payouts have failed for 3 days. I need the money today.",
"questions": {
"is_urgent": { "type": "noul", "instructions": "Does this message convey urgency?" },
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
}
}
}'
Prompt format
If you want to call the model yourself, this is the exact prompt it was trained on. Take the probabilities of the tokens A, B, C... for the first generated token and normalize them over your options.
<|im_start|>user
State (data to evaluate):
{state}
Question:
{instructions}
Options:
A: {option key} — {option description}
B: {option key} — {option description}
Return only the option letter.<|im_end|>
<|im_start|>assistant
<think>
</think>
For yes/no questions the options are A: false — No and B: true — Yes. For score questions the keys are 0, 1, 2... and the descriptions are your levels, lowest first.
Benchmarks
Note: These numbers are from a few public test sets. Your use case is not one of them, and results can be very different from one use case to another. Hmm does not match Jev on any of them. Please test it on your own data before you trust it with anything.
Everything is zero-shot, none of these test sets were used for training. Majority means always answering the most common label. Qwen3.5-4B is the base model without fine-tuning, same prompt. Jev is only shown where the benchmark's own authors measured it on exactly the same records, I did not run Jev myself.
| Benchmark | Majority | Qwen3.5-4B | Hmm 4B | Jev 1.13 |
|---|---|---|---|---|
| typed-decisions, 2,000 workflow decisions | 0.520 | 0.596 | 0.709 | 0.727 |
| Bespoke public suite, 13 human labelled tasks, macro | 0.721 | 0.750 | 0.760 | |
| OpenBookQA | 0.276 | 0.810 | 0.854 | |
| CommonsenseQA | 0.209 | 0.760 | 0.763 | |
| HellaSwag (2,000) | 0.261 | 0.765 | 0.722 | |
| Phishing emails (PhishNChips) | 0.500 | 0.648 | 0.629 |
- On decisions about text you give it (routing, classification, verification, workflows) Hmm is a few points behind Jev. It is not ahead of Jev on anything that counts.
- The fine-tune does not add knowledge, on knowledge benchmarks Hmm is about the same as the base Qwen. On game decisions (maze, doom) Hmm is not useful at all.
- A lot of the score comes from Qwen itself. The fine-tune adds 11 points on the workflow benchmark, about 3 on the Bespoke suite, and it made HellaSwag and phishing slightly worse.
- The Q4_K_M GGUF scores the same as the full model (0.715 vs 0.709 on typed-decisions, inside the noise).
Per-task tables, how the data was rebuilt, the overlap check and the caveats are in BENCHMARKS.md.
Training
- LoRA (r=32) on all attention and MLP projections, 1 epoch, around 30,000 questions.
- The training data is a mix of publicly available datasets and synthetic data. For the synthetic part DeepSeek V4.1 Flash (via Atlas Cloud) wrote around 7,400 cases with 26,000 questions for 100+ workflows, then answered every question again 3 times to get soft labels. Questions where it disagreed with itself were removed. This used about 25M tokens. The synthetic dataset is on Hugging Face: n4ze3m/typed-decisions-synth.
- Training took 2 hours on one rented RTX 3090, which costs about $0.42.
- The loss is plain cross entropy on the option letters, half on the answer and half on the soft labels.
Limitations
- One question is one forward pass, so many questions about a long state are slow.
- The model only knows 26 option letters. Longer lists (up to 255) still work with the server from the GitHub repo, it asks them in chunks of 25, but that is slower and less accurate.
- It was trained on prompts up to 768 tokens and only in English.
- The synthetic training data is written and labelled by an LLM. Nobody checked it.
- It can miss things a careful reader would catch. In my tests it allowed a shell command that hid an
rm -rfbehind base64. Do not use it as your only safety gate, and do not use it for anything important.
Citation
@misc{nazeem2026hmm,
author = {Muhammed Nazeem},
title = {Hmm: a small open model for typed decisions},
year = {2026},
url = {https://github.com/n4ze3m/hmm}
}
Support
If you like the project, you can support me on Ko-fi.
- Downloads last month
- -
4-bit
8-bit
16-bit