Clario: Gemma 4 E4B diary extractor, GGUF Q4_K_M

The patient-side model of Clario, a private symptom diary with a clinic review console (lablab.ai AMD Developer Hackathon ACT III, Track 2). It reads a diary note in plain English or Italian and returns the symptoms as JSON: each term with the exact words it came from, an HPO id, negation, family history, onset and severity.

This file is the Clario LoRA merged into google/gemma-4-E4B-it in bf16 (train/export.py merge in the repository), converted with llama.cpp's convert_hf_to_gguf.py and quantised to Q4_K_M with llama-quantize. It is 5.3 GB and runs on a CPU with no network, so the diary never has to leave the patient's computer.

The output is input for a clinician's review. It is not a diagnosis and must not be used as one.

Measured on an AMD Ryzen CPU

Same 100 held-out synthetic test diaries as every other row in the repository (clario-synth-v3 test split, held out by disease, 407 gold entities). F1 after Clario's ontology check (clario.extract.resolve_hpo), which is what the app stores.

Model Runs on F1 after HPO check Result file
This GGUF (Q4_K_M) AMD Ryzen 7 7700, 8 CPU cores, llama.cpp, offline 0.644 (P 0.648, R 0.641) eval/results/extraction_ft-e4b-q4km-ryzen-test100.json
Same fine-tune, bf16 vLLM, NVIDIA L4 (Modal) 0.693 extraction_ft-e4b-vllm-test100.json
Gemma 4 31B IT, zero-shot AMD Token Factory 0.471 extraction_tf-gemma-4-31b-it-test100.json
Gemma 4 E4B IT, no fine-tune transformers, NVIDIA L40S 0.356 extraction_base-e4b-test100.json

Quantising to Q4_K_M costs about 0.05 F1 against bf16 and keeps the 4B model ahead of the 31B one. On the Ryzen: median 23 s per diary at 2 requests in parallel, 22 output tokens/s, 100 rows in 19 minutes, 0 errors, JSON valid on 99 of 100, every quote grounded in the note. Negated symptoms are caught 79% of the time; family history is the weak spot (0 of 22).

The test diaries are synthetic and come from the same generator as the training data. These numbers are not evidence of performance on real patient text.

Run it

llama-server -m clario-e4b-v3-q4_k_m.gguf --device none -ngl 0 -c 8192 --port 8093 --jinja

Then point the Clario patient app at it (LLM_BASE_URL=http://127.0.0.1:8093/v1), or call the OpenAI-compatible endpoint yourself with the system prompt from train/prompt.py and the diary note as the only user turn. Use the same prompt at inference as in training.

Reproduce the row above from the repository root:

python eval/extraction_eval.py --base-url http://127.0.0.1:8093/v1 --model clario-e4b-v3-q4_k_m --limit 100 --label ft-e4b-q4km-ryzen-test100

Training

LoRA r 16, alpha 16, learning rate 2e-4, 3 epochs, on the language layers of Gemma 4 E4B (vision and audio towers untouched), 2,392 synthetic diaries written by Gemma 4 31B IT through the AMD Token Factory API. Trained on one NVIDIA L40S on Modal; we had no AMD GPU access during the event. Details in the adapter card and docs/BENCHMARK_4B.md.

Licence

Gemma 4 is released under Apache 2.0 (model card of google/gemma-4-E4B-it, checked 17 Oct 2026). These weights are derived from it and keep its licence and notices.

Downloads last month
47
GGUF
Model size
7B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for m0rtyddd/clario-gemma4-e4b-v3-gguf

Quantized
(478)
this model

Dataset used to train m0rtyddd/clario-gemma4-e4b-v3-gguf