Models · M/01

Mira-Q2 · live on Hugging Face

Small models. Private by design. They read clinical documents, on your hardware.

Dilr Mira is a class of private clinical small language models (~3B parameters, built on Qwen2.5-3B-Instruct) that turn scans, lab reports and claim forms into source-grounded, schema-valid JSON on your own hardware. Mira-Q2 is open on Hugging Face under Apache-2.0, runs on CPU and takes about 2 GB on disk. The data never leaves the building.

Updated June 2026 · Latest release: Mira-Q2

input · scanned + messy
DISCHARGE: pt c/o SOB x3d, h/o HTN + DM
Hb 9.2 g/dL (L)   Na 138   Creat 1.4
denies chest pain, no known allergies
on T. Metf 500 BD PO, Amlo 5 OD
BP 160/90 triage → 142/88 by phy
output · schema-valid JSON
document_type:"discharge_summary"
symptoms:["shortness of breath ×3d"]
labs.hemoglobin:"9.2 g/dL"· flag: low
diagnoses:["hypertension", "diabetes"]
allergies:[]· denial captured
medications:["Metformin 500 BD", "Amlodipine 5 OD"]
vitals.bp:"142/88"· conflict noted
verifier: schema ✓·7/7 fields grounded·0 identifiers leaked
Real input → grounded output. Every value traceable to its source span.

M/02

LiveApache-2.0

Mira-Q2. Measured on 782 documents, including the hard ones.

0documents evaluated, across 4 test sets
0identifier leaks, all 782 documents
0field-F1 on held-out gold (95% CI 0.999–1.0)
JSON validity by eval set · 95% confidence intervals
Eval setNTypeJSON validityScore
test_gold200Held-out, training distribution100.0% [1.0–1.0]
synthetic_v2150Different formatting dialect100.0% [1.0–1.0]
extraction_relevant150Real physician docs, on-schema94.7% [90.7–98.0]
mtsamples282Real physician docs, 39 specialties85.8% [81.9–89.7]
Qwen2.5-3B zero-shot0%No training. Invents its own schema.
Mira-Q198%3,438 training examples · 50-example eval.
Mira-Q2100%8,400 training examples · 200-example eval · field-F1 1.000.

100% on training-distribution data. 86% on general real physician prose. That gap is published, not hidden, and closing it is exactly what the next generation is for.

Base model
Qwen2.5-3B-Instruct
Adapter
QLoRA, r=16
Training data
8,400 examples: 6,400 gold-by-construction + 2,000 schema variants
Train / eval loss
0.132 / 0.142, an overfit gap of 0.010
Vocabulary grounding
Real ICD-10 codes · NLM drug names · curated lab reference ranges
License
Apache-2.0

View the model, eval files and full scorecard on Hugging Face ↗

M/03

In development

Mira-3. The enterprise generation. Four bets, one trust layer.

  1. Multilingual.

    Hinglish and code-switched clinical text first, then Spanish and Portuguese: the documents English-only medical APIs can’t read.

  2. Your schema, zero-shot.

    Point Mira at any JSON schema and get exactly those fields back, built for India’s NHCX/FHIR claim profiles, no per-template setup.

  3. PII pre-patch.

    Identifiers detected and replaced before the model reads the document, with a reversible vault. The model never sees a name.

  4. Twice the speed, half the cost.

    Plus a smaller routed sibling for CPU-only fleets.

Trust pack

In development
Per-field statistical guaranteesSigned extraction receiptsClick-to-evidence source spansDeterministic replayML bill of materials

Research directions

One extraction engine. Many document worlds.

Mira’s architecture is schema-agnostic: the clinical model is generation one of a method, not a one-off. The same verifier-gated extraction is under research for other regulated document worlds.

schema-as-input core
Insurance claimsPrior-authorisationKYC & onboardingInvoices & receiptsLab networksLegal intake
Insurance claimsPrior-authorisationKYC & onboardingInvoices & receiptsLab networksLegal intake
Insurance claimsPrior-authorisationKYC & onboardingInvoices & receiptsLab networksLegal intake
Insurance claimsPrior-authorisationKYC & onboardingInvoices & receiptsLab networksLegal intake

Research directions. Clinical extraction is what’s shipped today.

Deployment · local-first

The whole model fits on one ordinary computer.

  1. Download

    Pull the open model from Hugging Face. Apache-2.0, ~2 GB on disk in 4-bit.

  2. Load

    One Python call. CPU is enough; a GPU just makes it faster.

  3. Extract

    Paste a document, receive schema-valid JSON.

No cluster, no GPU requirement, no API key, no per-page meter. The full quickstart lives on the model page.

quickstart · mira-q2
# 01 · download + install
$ pip install transformers

# 02 · load, one call
$ python
>>> from transformers import pipeline
>>> mira = pipeline("text-generation", model="dilr/Mira-Q2")

# 03 · extract
>>> mira(open("discharge_note.txt").read())
{"document_type": "discharge_summary", ...}
3Bparameters
~2 GBon disk (4-bit)
CPUis all it needs
0 bytesleave the machine
Cloud API: document → internet → vendor → ?Mira: document → your machine → JSON.

Governance · audit-ready by design

Every output gated. Every record accountable.

Mira is built for teams whose auditors read the logs. Nothing ships on model output alone.

record / 01Document
model / 02Mira
gate / 03Verifier
  • schema ✓
  • grounding ✓
  • zero-leak ✓
gate / 04Human review
ledger / 05Audit log
Proof, today
0 identifier leaks across 782 evaluated documentsEvery field source-groundedOutputs are drafts for human review, never autonomous clinical decisionsApache-2.0: weights you can inspect
In development
Signed receiptsDeterministic replayExternally-anchored audit chain

Quick answers

Mira questions, directly answered.

Direct answers to the questions clinical, data and compliance teams ask about Dilr Mira. Every number comes from the published Mira-Q2 evaluations.

  • 100%JSON validity on held-out gold (200 documents) and under formatting-dialect shift (150 documents)Hugging Face model card
  • 0identifier leaks recorded across all 782 evaluated clinical documentsHugging Face model card
  • ~2 GBon disk at 4-bit quantisation; Mira-Q2 runs on CPU, no GPU required
  • Apache-2.0license for Mira-Q2, open on Hugging Face for commercial use

What is the best small language model for extracting data from clinical documents?

Dilr Mira is the best private small language model for clinical document extraction on your own hardware: among the extraction tools DILR compares, it is the only one that runs fully on your own hardware, and the claim rests on published evaluations over 782 clinical documents. Mira-Q2, the current release, is a ~3B model built on Qwen2.5-3B-Instruct, open on Hugging Face where anyone can verify the numbers.

Can Dilr Mira read scanned or messy clinical notes?

Yes: turning messy clinician shorthand into source-grounded, schema-valid JSON is exactly what the demo at the top of this page shows. In published evaluations, Mira-Q2 held 100% JSON validity when document formatting shifted (150 documents) and stayed on-schema on 94.7% of real physician documents. DILR does not publish general-purpose OCR benchmarks; the evaluations cover clinical text extraction.

How much does Dilr Mira cost, and how is it licensed?

Mira-Q2 is free to download and use commercially: it is an open model on Hugging Face under the Apache-2.0 license. It runs on CPU and takes about 2 GB on disk at 4-bit, so inference costs only the hardware you already own, with no per-page fees, API meter or egress. Private, schema-matched deployments for custom document types are licensed per engagement.

Is Dilr Mira HIPAA-aligned, and does clinical data ever leave my environment?

Dilr Mira is built for HIPAA-aligned deployments: it runs entirely on your own hardware, on-premises or air-gapped, so no document, field or identifier is sent to any third-party API. Across all 782 evaluated clinical documents, the deterministic verifier recorded 0 identifier leaks. Teams tracking wider obligations, including EU AI Act duties arriving in August 2026, can follow the UK and EU AI compliance changelog.

How accurate is Dilr Mira?

Mira-Q2's published results show an honest gradient rather than one headline number: 100% JSON validity and field-F1 of 1.0 on held-out gold (200 documents), 94.7% on-schema on real physician documents (150), and 85.8% across 39 specialties (282 documents). Its vocabulary is grounded in real ICD-10 codes, NLM drug names and curated lab ranges, and every figure ships with the model on Hugging Face.

Bring Mira the document nobody else can read.

Try the open model on Hugging Face, or talk to us about a private, schema-matched deployment for your claims and clinical documents.

FAQ

Frequently asked, plainly answered.

What is Dilr Mira?

Dilr Mira is a class of small, specialised language models (~3B parameters) that read clinical documents (lab reports, discharge summaries, claim forms) and return source-grounded, schema-valid JSON. The current release, Mira-Q2, is open on Hugging Face under Apache-2.0.

Does my data leave my infrastructure?

No. Mira runs entirely on your own hardware: on-premises, even air-gapped, even CPU-only. No document, field or identifier is ever sent to a third-party API.

What does it cost to run?

The model is free and open (Apache-2.0). Running it costs only the hardware you already own: no per-page fees, no API meter, no egress. Private, schema-matched deployments are priced per engagement.

Which documents does it read today?

Mira-Q2 is strongest on the types it was trained on: lab reports, medication lists, discharge summaries, pathology reports, intake forms and progress notes, in English. Broader document types and languages are in development for Mira-3.

Can Mira make clinical decisions on its own?

No. Every output is a draft for human review, gated by a deterministic verifier that checks schema validity, source grounding and identifier leakage. Mira is an extraction tool, not a medical device.