Quickstart
Install a recent transformers (the weights were saved with 5.17), then ask the model to act through a tool:
pip install "transformers>=5.17" torch accelerate
from transformers import AutoModelForImageTextToText, AutoProcessor model_id = "charcot-ai/crs-4b"processor = AutoProcessor.from_pretrained(model_id)model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="auto", device_map="auto") tools = [{ "type": "function", "function": { "name": "fhir_create", "description": "Create a FHIR R5 resource in the patient's chart.", "parameters": { "type": "object", "properties": {"resource": {"type": "object", "description": "FHIR R5 resource JSON"}}, "required": ["resource"], }, },}]messages = [{ "role": "user", "content": "Patient/avery-1. New lab report, 2025-07-06: ALT 49 U/L. Save this result to the chart.",}] inputs = processor.apply_chat_template( messages, tools=tools, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt",).to(model.device)output = model.generate(**inputs, max_new_tokens=512)print(processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Outputs
The chat template opens a <think> block, so the decoded text is the model's reasoning, a closing </think>, and then zero or more tool calls in the Qwen3.5 format:
<tool_call><function=fhir_create><parameter=resource>{"resourceType": "...", ...}</parameter></function></tool_call>
Table with columns: Part, What to do with it| Part | What to do with it |
|---|
Text before </think> | Reasoning; drop it or log it |
<function=NAME> | Name of the tool to call |
<parameter=KEY> | One argument; the value is JSON when the schema type is an object |
Run the tool, append the result as a {"role": "tool", "content": ...} message, and generate again until the model answers without a tool call.
To score the model on real tasks, serve it behind an OpenAI-compatible endpoint and run charcot-gym eval as described in the Charcot Gym README.
Results
Table with columns: Model, Mean task score| Model | Mean task score |
|---|
| Qwen3.5-4B (base) | 0.16 |
| CRS-4B (fine-tuned) | 0.86 |
| Frontier models on the same tasks | 0.76–0.89 |
99 private tasks, 3 attempts per task, November 2026. The private tasks were never seen in training. A deterministic offline verifier checks the final record and task constraints; no LLM judge is used. These scores describe performance on the evaluated tasks; they do not establish a general ranking outside this evaluation.
Training and evaluation
Table with columns: Stage, Detail| Stage | Detail |
|---|
| Training | Supervised fine-tuning on public synthetic Gym episodes only |
| Evaluation | Held-out private split, repeated attempts per task |
| Integrity checks | Patient identity and preservation of existing resources |
| Private reporting | Aggregate scores only; private task contents, per-task outputs, and trajectories are not returned to submitters |
See the evaluation methodology for scoring and the submission policy.
Files
Table with columns: Path, Contents| Path | Contents |
|---|
model.safetensors-* | Merged weights; load with the Quickstart above |
adapter/ | The LoRA adapter (rank 32) for Qwen/Qwen3.5-4B |
chat_template.jinja | Chat template with tool-call formatting |
Limitations
- The reported result measures synthetic task completion, not performance in patient care. Do not use the model for clinical decisions.
- Training and evaluation data are synthetic and in English.
- Scores cover the three task families above; other Charcot Gym families and other clinical tasks were not reported here.
Citation
@misc{charcot2026crs4b, title = {CRS-4B: A clinical tool-use model trained in a synthetic EHR}, author = {{Charcot AI}}, year = {2026}, howpublished = {\url{https://huggingface.co/charcot-ai/crs-4b}}}
Longitudinal data and evaluation infrastructure for healthcare AI agents. charcot.ai · Charcot Gym · Public tasks