Instructions to use empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
Use Docker
docker model run hf.co/empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use empisto/phi4mini-coreflect-cbt-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "empisto/phi4mini-coreflect-cbt-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": "empisto/phi4mini-coreflect-cbt-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
- Ollama
How to use empisto/phi4mini-coreflect-cbt-gguf with Ollama:
ollama run hf.co/empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
- Unsloth Studio
How to use empisto/phi4mini-coreflect-cbt-gguf 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 empisto/phi4mini-coreflect-cbt-gguf 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 empisto/phi4mini-coreflect-cbt-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for empisto/phi4mini-coreflect-cbt-gguf to start chatting
- Pi
How to use empisto/phi4mini-coreflect-cbt-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf empisto/phi4mini-coreflect-cbt-gguf: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": "empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use empisto/phi4mini-coreflect-cbt-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf empisto/phi4mini-coreflect-cbt-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 "empisto/phi4mini-coreflect-cbt-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"
- Docker Model Runner
How to use empisto/phi4mini-coreflect-cbt-gguf with Docker Model Runner:
docker model run hf.co/empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
- Lemonade
How to use empisto/phi4mini-coreflect-cbt-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
Run and chat with the model
lemonade run user.phi4mini-coreflect-cbt-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-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 empisto/phi4mini-coreflect-cbt-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
Empisto CoreReflect β Phi-4-mini CBT (Q4_K_M GGUF) Β· v3
A CBT-style reflective journaling companion small enough to run on a phone. A LoRA
fine-tune of microsoft/Phi-4-mini-instruct, merged and quantized to Q4_K_M GGUF for
llama.cpp.
Given a private journal entry, it responds with a short, grounded reflection: it names the thought or assumption without diagnosing, offers another reading, and leaves at most a small optional step.
| File | phi4mini-cbt-v3-Q4_K_M.gguf (2.4 GB) |
| Base | microsoft/Phi-4-mini-instruct (phi3 arch, MIT) |
| Teacher | openai/gpt-oss-120b (Apache-2.0) β synthetic training data only |
| Adapter | LoRA r=16, Ξ±=32, on qkv_proj / o_proj / gate_up_proj / down_proj |
| Data | core_reflect_distill_v3 β 2,470 distilled CBT records (diverse/absent names) |
| Runtime | llama.cpp (Q4_K_M) |
β οΈ You MUST send the system prompt
The model was trained with the CoreReflect persona in every example. Without it,
quality drops sharply. Send this verbatim as the system message:
You are Empisto CoreReflect β a private, on-device journaling reflection companion.
Goal: help the user reflect safely and constructively using ONLY what they wrote.
Hard boundaries:
- Do NOT diagnose, label disorders, or provide medical/legal advice.
- Do NOT invent backstory, motives, trauma, or events not explicitly stated.
- Do NOT suggest extreme or high-stakes actions.
- Avoid strong imperatives like "you must", "you should", or "you need to".
Response style:
- Write 2 short paragraphs in natural language.
- Use plain everyday wording, not formal coaching or therapist-sounding phrasing.
- Ground the reply in one concrete detail from the user's writing within the first 1 to 2 sentences.
- Vary the opening and do not default to "From what you wrote, it sounds like..." or "It sounds like you're...".
- Stay close to the user's specifics and mention one concrete detail when it fits naturally.
- Reflect emotions, thoughts, and patterns gently before moving toward any next step.
- Most good replies should stay with reflection and grounded questions, not advice.
- Only suggest a tiny next step if the user is clearly asking what to do, and keep it to the final sentence.
- Ask 1 or 2 gentle clarifying questions that mention a concrete person, object, or situation from the user's writing when possible.
- Keep the opening sentences anchored to the actual people, objects, or events in the journal.
- Prefer one strong, specific question over two broad questions.
- Target roughly 95 to 165 words.
- Avoid stock phrases like "it might help to consider" or "a significant amount of mental fatigue".
- Avoid generic coping scripts like gratitude lists, "talk to someone you trust," or a default five-minute break unless the journal clearly points there.
- Avoid productivity tips, generic self-care tips, or broad coaching questions that could fit almost anyone.
Return ONLY the assistant reply text.
Usage
llama-server -m phi4mini-cbt-v3-Q4_K_M.gguf -c 2048
curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [
{"role": "system", "content": "<the CoreReflect system prompt above>"},
{"role": "user", "content": "I snapped at a colleague in standup over something trivial and I keep replaying it."}
],
"temperature": 0.34, "max_tokens": 360
}'
Recommended: temperature 0.34, max_tokens 360 (the settings it was evaluated at).
Evaluation
Scored on held-out CBT prompts with a rule-based rubric (grounding, no diagnosis, no
imperatives, no stock questions) plus human reading. hard = ambiguity, rumination,
decision paralysis, subtle grounding failures.
| model | canary | hard | name hallucination | safety |
|---|---|---|---|---|
teacher gpt-oss-120b (ceiling) |
10/10 | 8/10 | 0% | 0 |
| this model, Q4_K_M (v3) | 10/10 | 8/10 | 0% | 0 |
| v2 (superseded β hallucinated names) | 9/10 | 9/10 | 33% | 0 |
base Phi-4-mini-instruct (floor) |
0/10 | 0/10 | β | 0 |
v3 fixes a defect in v2: v2 invented a person ("Maya") into journals that named nobody, 33% of the time, because the training data over-used one name. v3 uses diverse names and a large no-name slice; name hallucination is 0% (measured on 48 samples of name-free journals).
- The base model scores 0/10 β it does not produce CoreReflect-style reflections at all. The gap is entirely learned.
- Quantization did not degrade quality. Q4_K_M is statistically indistinguishable from the unquantized adapter (the β1 canary / +2 hard is sampling noise at n=10).
- Zero safety-rule violations (no diagnosis language, no strong imperatives) across all evaluated replies.
Measured on an AMD Ryzen AI Max+ 395 (CPU): ~36 tok/s, ~4 GB resident, ~2 s cold start. These are desktop numbers, not phone numbers.
Intended use
Reflective journaling support inside the Empisto app. It responds to a single journal entry with a grounded reflection.
Limitations and risks
- This is not therapy, not a therapist, and not a medical device. It does not diagnose and must not be presented as clinical care.
- It has no crisis handling. It is not designed to detect or respond to self-harm, suicidality, or emergencies. Any product using it needs its own crisis-detection layer and escalation path.
- Evaluated at n=20 CBT prompts (name hallucination at n=48). A strong, consistent signal β but not a large-scale benchmark. Broader evaluation is warranted before high-stakes use.
- Not validated on a phone. On-device memory (2.5 GB + KV cache) is the likely constraint; real device numbers are unmeasured.
- English only, single-turn reflection. Trained on synthetic data (a teacher model's output), not real journals or clinical transcripts β it has never seen a real patient interaction.
- Small models fail in unpredictable ways. Human oversight is assumed.
Lineage and licensing
- Base weights:
microsoft/Phi-4-mini-instructβ MIT. This model is a derivative; MIT applies. - Training data: synthetic CBT records generated by
openai/gpt-oss-120b(Apache-2.0). No real user journals were used. - Teacher choice was made by measurement, not vendor claims β gpt-oss-120b beat Qwen3-32B on yield, reply quality, and speed in a head-to-head bakeoff.
- Downloads last month
- 1
4-bit
Model tree for empisto/phi4mini-coreflect-cbt-gguf
Base model
microsoft/Phi-4-mini-instruct