Instructions to use srock44/cipher-pro 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 srock44/cipher-pro 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 srock44/cipher-pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf srock44/cipher-pro:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf srock44/cipher-pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf srock44/cipher-pro: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 srock44/cipher-pro:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf srock44/cipher-pro: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 srock44/cipher-pro:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf srock44/cipher-pro:Q4_K_M
Use Docker
docker model run hf.co/srock44/cipher-pro:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use srock44/cipher-pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "srock44/cipher-pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srock44/cipher-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/srock44/cipher-pro:Q4_K_M
- Ollama
How to use srock44/cipher-pro with Ollama:
ollama run hf.co/srock44/cipher-pro:Q4_K_M
- Unsloth Studio
How to use srock44/cipher-pro with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for srock44/cipher-pro to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for srock44/cipher-pro to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for srock44/cipher-pro to start chatting
- Pi
How to use srock44/cipher-pro with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf srock44/cipher-pro:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "srock44/cipher-pro:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use srock44/cipher-pro with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf srock44/cipher-pro: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 "srock44/cipher-pro: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"
- Docker Model Runner
How to use srock44/cipher-pro with Docker Model Runner:
docker model run hf.co/srock44/cipher-pro:Q4_K_M
- Lemonade
How to use srock44/cipher-pro with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull srock44/cipher-pro:Q4_K_M
Run and chat with the model
lemonade run user.cipher-pro-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use srock44/cipher-pro with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf srock44/cipher-pro: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 srock44/cipher-pro:Q4_K_M
Run Hermes
hermes
- Atomic Chat
Cipher Pro
Cipher Pro is a LoRA fine-tune of Qwen/Qwen3-4B-Instruct-2507, trained on every LLM-backed feature of a local-first email assistant: email triage (importance/summary/category JSON), chat, daily-summary synthesis, draft reply, and compose assist โ not just prompted for these tasks, actually trained on them.
It's the largest of the three Cipher tiers (cipher-nano / cipher-air / cipher-pro), and the strongest on structured-output accuracy โ 100% category accuracy on the triage benchmark below. Cipher is the local-model engine for an unreleased larger email-assistant project โ that project isn't public yet, but these weights, the training code, the eval script, and all five dataset generators are fully open now, in this repo.
Why this exists
Most email triage today means sending your inbox to a third-party API. Cipher runs entirely on your own hardware via Ollama โ nothing about your email ever leaves your machine.
What's in this repo
cipher-pro.Q4_K_M.ggufโ the model weights, ready for OllamaModelfileโ the exact Ollama Modelfile (system prompt, explicit ChatMLTEMPLATE, inference params) used in training/eval โ useollama create, notollama pull hf.co/..., see the integration note belowtrain_cipher_pro.py/export_gguf_cipher_pro.pyโ the exact scripts used to produce this model (Unsloth LoRA on the base model above)generate2.py,generate_chat.py,generate_daily_summary.py,generate_draft_reply.py,generate_compose.pyโ the five task-specific synthetic-data generators (produces the full multi-task training set)eval_triage.py/eval_fixtures.jsonโ a standalone benchmark harness (no external dependencies beyondhttpx/pydantic) reproducing the triage numbers below
Everything needed to reproduce this model from scratch, or fine-tune your own variant, is in this repo โ nothing here depends on an unreleased package.
Benchmark
Evaluated on a 29-fixture triage benchmark against the untuned base model, on an RTX 5070:
| Model | Disk | Tok/s | JSON-valid | Category acc | Importance-in-band | Injection-safe |
|---|---|---|---|---|---|---|
| cipher-pro | 2.5 GB | 171.2 | 79.3% | 100.0% | 87.0% | 100% |
| qwen3:4b-instruct (untuned base) | ~2.5 GB | โ | โ | โ | โ | โ |
Reproduce with:
pip install -r requirements.txt
python eval_triage.py --models cipher-pro:latest --keep
Integration note: chat template
Qwen3's chat template isn't reliably auto-detected from the exported GGUF by Ollama (confirmed live โ ollama show --modelfile fell back to a raw passthrough template with no role formatting, causing the model to leak stray </think>/</tool_call> closing tags before its JSON output). The included Modelfile sets an explicit ChatML TEMPLATE matching what this model was actually trained on โ don't rely on Ollama's autodetection or ollama pull hf.co/... (which generates its own default template and ignores the Modelfile committed in this repo). If you're integrating this into your own app rather than using Ollama, llama-server (llama.cpp's own server binary) handles Qwen3's real chat template correctly on its own โ verified directly, no override needed there.
Even with the correct template, a small residual fraction of completions may still leak a stray reasoning/tool-call tag before the JSON (Qwen3's own pretraining bakes in tool-calling habits that a LoRA adapter โ 0.81% of this model's parameters โ can't fully suppress). If you're parsing structured output, strip any leading </think>/<think>/</tool_call>/<tool_call> run before json.loads() โ see strip_leading_reasoning_tags() in Grimoire's own llm_client.py for the reference implementation.
Usage (Ollama)
ollama create cipher-pro -f Modelfile
Query it with grammar-constrained JSON output for reliable parsing:
curl http://localhost:11434/api/chat -d '{
"model": "cipher-pro",
"messages": [
{"role": "system", "content": "<system prompt from Modelfile>"},
{"role": "user", "content": "From: alex@acme.com\nSubject: Q3 budget review\n\nBody:\nCan we sync before Friday?"}
],
"format": "json",
"options": {"temperature": 0.1}
}'
Training
- Base:
Qwen/Qwen3-4B-Instruct-2507, LoRA (r=16, alpha=32, all linear layers), 2 epochs - Data:
4,800 triage examples + ~1,600-2,000 examples each for chat/daily-summary/draft-reply/compose (13,000 total, triage oversampled), all matching Grimoire's exact production prompts โ generated by the fivegenerate_*.pyscripts in this repo - Framework: Unsloth +
trl.SFTTrainer - Sequence packing (
trl.SFTConfig(packing=True)) was tried to speed up training given most examples are well under the 2048-token context window โ it crashed outright (ValueError: Expected input batch_size (2048) to match target batch_size (3636), an Unsloth fused-loss/trl packing-collator incompatibility in this exact library version pairing), not a quality tradeoff. Disabled. - Reproduce with
train_cipher_pro.pyโexport_gguf_cipher_pro.py
License
Apache 2.0, inherited from the base model. Weights, training code, and eval harness are fully open.
- Downloads last month
- -
4-bit
Model tree for srock44/cipher-pro
Base model
Qwen/Qwen3-4B-Instruct-2507