All models

Literature · stanfordmimi

MedVAL-4B

A language model fine-tuned to validate AI-generated medical text against expert inputs with risk grading.

What MedVAL-4B is

MedVAL-4B is a medical text validation model developed by stanfordmimi.

Automating the quality control of clinical language generation is critical for determining whether generative model outputs are factually aligned with medical source data. MedVAL-4B addresses this by assessing factual consistency in relation to task instructions, generating detailed clinical reasoning, cataloguing specific errors, and assigning a standardized clinical risk score to each evaluated text.

The model is designated for research use only and is not a medical device. It must not be deployed for clinical decision-making, diagnosis, or patient treatment.

How it works

MedVAL-4B is built on the Qwen3-4B transformer-based language model architecture. It was fine-tuned on medical text using the MedVAL-Bench dataset via Parameter-Efficient Fine-Tuning (PEFT) and Quantized Low-Rank Adaptation (QLoRA) using the DSPy framework. The model operates with bfloat16 precision and 4-bit quantization.

During evaluation, the model receives three inputs: the task instruction used to create the text, the expert-written original source text, and the candidate AI-generated output. It generates a chain of reasoning followed by an assessment mapped to an eleven-category error taxonomy (including fabricated claims, misleading justifications, detail misidentifications, and intensity misstatements) and assigns a risk grade ranging from Level 1 (no risk) to Level 4 (high risk).

Key facts

Base architecture
Qwen3-4B (transformer)
Fine-tuning technique
PEFT (QLoRA) via DSPy
Precision
bfloat16 (bf16) with 4-bit quantization
Evaluation dataset
MedVAL-Bench
Input modalities
Text (instruction, original input, AI-generated output)
Output modalities
Text (reasoning, categorized errors, risk level)
Supported languages
English, Spanish
GPU memory requirement
24 GB

What you can use it for

Radiology report summary validation
Inspect AI-generated impressions against original radiology findings to detect omitted findings, fabricated claims, or altered clinical severity.
Clinical risk grading
Automatically assign standardized risk levels (Level 1 No Risk through Level 4 High Risk) to machine-written medical texts based on their potential impact on patient safety and decision-making.
Medical text factual consistency audits
Categorize specific clinical inaccuracies in generated text across eleven distinct error categories, such as false comparisons and misleading justifications.

Run it here

No installation and no GPU of your own: fill in the inputs and it runs on our servers. Results stay in your browser unless you sign in.

Runs on On-demand GPU

Runs on our servers with on-demand compute. A first run needs time to load the model; active capacity can be reused and scales down when idle.

Run this model

MedVAL-4B

The model continues from here.

Needs prompt

Strengths and limits

Good at

  • Provides structured, fine-grained categorisation across eleven distinct clinical error classes rather than a simple binary pass or fail.
  • Incorporates a standardized four-level clinical risk grading scheme tied to patient safety and decision-making impact.
  • Supports both thinking and non-thinking generation modes during chat-based inference.

Watch out for

  • For research use only: it is not a medical device and must not be used for diagnosis, treatment or any clinical decision.
  • Not a medical device and must not be used for diagnosis, clinical treatment, or clinical decision-making.
  • Evaluations are limited to textual comparisons between task instructions, input text, and model outputs.
  • Requires significant computational resources, specifying 24 GB of GPU memory for standard execution.

Inputs and outputs

You provide

  • Prompt

    The model continues from here.

You get back

  • The model's completion.

MedVAL-4B API

The same run, from your own code: one HTTP request with an API key, billed in the same credits as the Run button. A fast run answers with its outputs; a longer one answers with a poll_url to read.

bash
curl https://corollary-labs.com/api/v1/models/stanfordmimi-medval-4b/runs \
  -H "Authorization: Bearer $COROLLARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "text": "<Prompt>"
  }
}'

Make an API key, then read the models reference.

Licence

Commercial use permitted · mit

mit, as the repository declares it. Read by the catalogue intake on 2026-11-28.

Questions

Can I use MedVAL-4B commercially?

Commercial use permitted. mit, as the repository declares it. Read by the catalogue intake on 2026-11-28.

How do I run MedVAL-4B without installing anything?

Use the form under “Run it here” on this page: fill in the inputs and press Run model. It runs on our servers on 1× A100 16GB, typically in 1.2min, and a run costs about 70 credits. Visitors without an account get 1,000 credits a month.

What inputs does MedVAL-4B require to evaluate a text?

The model expects three distinct text inputs: the original task instruction, the expert-composed input text, and the AI-generated output being audited.

What categories of errors does the model identify?

It classifies errors into eleven categories: fabricated claims, misleading justifications, detail misidentifications, false comparisons, incorrect recommendations, missing claims, missing comparisons, missing context, overstating intensity, understating intensity, and an 'other' category.

What base model was used to create MedVAL-4B?

The model is based on Qwen/Qwen3-4B and fine-tuned using QLoRA via DSPy.

How to cite it

Asad Aali, Vasiliki Bikia, Maya Varma, Nicole Chiou, Sophie Ostmeier, Arnav Singhvi, Magdalini Paschali, Ashwin Kumar, Andrew Johnston, Karimar Amador-Martinez, Eduardo Juan Perez Guerrero, Paola Naovi Cruz Rivera, Sergios Gatidis, Christian Bluethgen, Eduardo Pontes Reis, Eddy D. Zandee van Rilland, Poonam Laxmappa Hosamani, Kevin R Keet, Minjoung Go, Evelyn Ling, David B. Larson, Curtis Langlotz, Roxana Daneshjou, Jason Hom, Sanmi Koyejo, Emily Alsentzer, and Akshay S. Chaudhari. MedVAL: Toward Expert-Level Medical Text Validation with Language Models. arXiv preprint arXiv:2507.03152, 2025.

Written from MedVAL-4B's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.