Instructions to use m0rtyddd/clario-gemma4-e4b-extract-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="m0rtyddd/clario-gemma4-e4b-extract-gguf", filename="clario-extract-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf m0rtyddd/clario-gemma4-e4b-extract-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 m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf m0rtyddd/clario-gemma4-e4b-extract-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 m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
Use Docker
docker model run hf.co/m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "m0rtyddd/clario-gemma4-e4b-extract-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": "m0rtyddd/clario-gemma4-e4b-extract-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
- Ollama
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with Ollama:
ollama run hf.co/m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
- Unsloth Studio new
How to use m0rtyddd/clario-gemma4-e4b-extract-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 m0rtyddd/clario-gemma4-e4b-extract-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 m0rtyddd/clario-gemma4-e4b-extract-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for m0rtyddd/clario-gemma4-e4b-extract-gguf to start chatting
- Pi new
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf m0rtyddd/clario-gemma4-e4b-extract-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": "m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf m0rtyddd/clario-gemma4-e4b-extract-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 m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with Docker Model Runner:
docker model run hf.co/m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
- Lemonade
How to use m0rtyddd/clario-gemma4-e4b-extract-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull m0rtyddd/clario-gemma4-e4b-extract-gguf:Q4_K_M
Run and chat with the model
lemonade run user.clario-gemma4-e4b-extract-gguf-Q4_K_M
List all available models
lemonade list
Clario · Gemma 4 E4B · Symptom-Diary Extractor (GGUF · Q4_K_M)
CPU-friendly GGUF build of the
Clario v2 LoRA
merged into unsloth/gemma-4-e4b-it. Quantized to Q4_K_M (~5 GB) for
single-step use through Ollama or llama.cpp — no Python sidecar, no
bitsandbytes, no CUDA requirement. Runs on Mac (Metal), Linux, Windows,
and CPU.
This is the same model published as a LoRA adapter in
m0rtyddd/clario-gemma4-e4b-lora-v2,
just merged and quantized. For QLoRA / PEFT workflows on a CUDA box,
prefer that repo. For everything else, prefer this one.
Quick start (Ollama)
# 1. download the GGUF + Modelfile to a folder
huggingface-cli download m0rtyddd/clario-gemma4-e4b-extract-gguf \
--local-dir ./clario-extract --include "*.gguf" "Modelfile"
# 2. register with Ollama
cd clario-extract
ollama create clario-extract -f Modelfile
# 3. run
ollama run clario-extract "Diary entry: My eyes are gritty and my mouth is so dry I can't swallow toast."
Or invoke from any Ollama-compatible HTTP client at
http://127.0.0.1:11434/api/chat with model: "clario-extract".
Quick start (llama.cpp / llama-cli)
llama-cli -m clario-extract-q4_k_m.gguf \
-p "Diary entry: My eyes are gritty and my mouth is so dry I can't swallow toast." \
--temp 0 -n 512
What the model does
Converts colloquial patient diary text into a structured JSON list of
medical entities with canonical names suitable for HPO (Human Phenotype
Ontology) lookup. Trained on 411 distilled (diary, target_json) pairs
derived from Orphanet rare-disease phenotypes and HPO synonyms.
diary text → [Gemma 4 E4B + Clario LoRA, Q4_K_M] → JSON entities
→ deterministic HPO synonym lookup → HPO IDs + canonical names
The model is not asked to memorise the ~17k HPO IDs from 411
examples. Its job is to extract and canonicalise symptom mentions; IDs
are resolved afterwards from a versioned ontology. The reference HPO
lookup is built by Clario's backend/scripts/build_knowledge.py from
HPO hp.obo + Orphanet en_product4.xml. See
m0rtyddd/clario-synthetic-diary
for the training corpus and the model card of the unquantized LoRA for
the full discussion of limitations.
Performance vs the LoRA adapter
Q4_K_M is the recommended quantization — best size/quality tradeoff across the K-quant family. On Gemma-family models Q4_K_M typically preserves >97% of the BF16 quality on extraction tasks. Reference metrics from the unquantized LoRA (held-out by disease, 68 examples):
| Metric | Vanilla Gemma 4 E4B | Clario LoRA | Δ |
|---|---|---|---|
| JSON schema correctness | 0%¹ | 100% | +100 pp |
| Name F1 (synonym-aware) | 0.209 | 0.524 | +151% |
| HPO ID F1 (via name→lookup) | 0.349 | 0.524 | +50% |
¹ Without normalising baseline's ad-hoc schema, every baseline score would be 0.
This GGUF was not re-measured against the held-out set after quantization in the hackathon window. Expect a small drop relative to the BF16/4-bit-NF4 numbers above; the system prompt and two few-shot demonstrations are baked into the Modelfile and stack the same way they do for the LoRA path.
Files
| File | Size | What |
|---|---|---|
clario-extract-q4_k_m.gguf |
~5.0 GB | the model |
Modelfile |
<1 KB | Ollama Modelfile with SYSTEM_PROMPT + 2 few-shot demos |
README.md |
this file | — |
Intended use, out of scope, limitations
See the matching sections in
m0rtyddd/clario-gemma4-e4b-lora-v2.
TL;DR: extract symptoms, do not trust the model's hpo_id field
(always post-resolve via deterministic lookup), human-in-the-loop
review, English only, not a diagnostic tool.
Licence
CC-BY-4.0, propagating the licences of training data sources (HPO CC-BY-4.0, Orphanet free with attribution) and the Gemma Terms of Use for the base model.
Cite as:
@misc{okulov2026clario_gguf,
title = {{Clario} {Gemma 4 E4B} Symptom-Diary Extractor (GGUF, Q4\_K\_M)},
author = {Okulov, Maksim},
year = {2026},
howpublished = {\url{https://huggingface.co/m0rtyddd/clario-gemma4-e4b-extract-gguf}}
}
- Downloads last month
- 179
4-bit