MedChain-R1-4B-GGUF / README.md
prithivMLmods's picture
Update README.md
ae5f7f4 verified
|
Raw History Blame Contribute Delete
4.59 kB
metadata
license: apache-2.0
language:
  - en
base_model:
  - adidukrembzuai/MedChain-R1-4B
pipeline_tag: image-text-to-text
library_name: transformers
tags:
  - text-generation-inference
  - llama-cpp
  - medical
  - multimodal
  - grounding
  - visual-grounding
  - multi-image
  - reasoning
  - chain-of-thought
  - radiology
  - mri
  - ct
datasets:
  - adidukrembzuai/MedChain-R1-data
  - MedSG-Bench/MedSG-Bench

MedChain-R1-4B-GGUF

MedChain-R1-4B is the 4B sibling of MedChain-R1-9B, a vision-language model for sequential medical image grounding built on Qwen3.5-4B ("Think Before You Locate"). Given a sequence of medical images and a clinical question, it first writes an image-grounded rationale in <think> tags, then returns one pixel-coordinate bounding box. Training used deliberative chain-of-thought supervision (dCoT-SFT) on the MedChain corpus, then GRPO with an IoU plus format reward. MedChain has 182,573 filtered rationales over the 8 MedSG-Bench tasks and 10 imaging modalities. A medical VLM (FlemingVL-38B) drafts each rationale and a multimodal refiner (Qwen3.5-397B-A17B) rewrites it conditioned on the annotated box. This checkpoint (dCoT-SFT checkpoint-2000 followed by one GRPO pass, seed 42) scores 75.97 mIoU / 83.67 Acc@0.5 on all 9,630 MedSG-Bench test questions. That is slightly above the paper's 4B GRPO row (75.32 / 82.89, from a different checkpoint) and above the supervised state of the art MedSeq-Grounder 7B (72.55 / 79.71). It is below the 9B sibling (77.54 / 84.87), which the card recommends for highest accuracy, while the 4B is pitched at resource-constrained settings. The paper notes the gains vary by task. Against an answer-only 4B model, the reasoning supervision gains 14.7–16.1 mIoU on difference grounding but loses 2.2–3.2 on multi-view, patch and referring grounding, and GRPO adds little after dCoT-SFT. The card says to append its exact instruction to every question, generate one example at a time because batching gave degenerate outputs, and use the bundled processor, since a lower-resolution one costs 3–5 points. The rationales were written knowing the answer, so they may be post-hoc rather than a faithful account of the model's reasoning. It is a research artifact, not validated for diagnosis or clinical use, and is evaluated only on MedSG-Bench. The license is Apache 2.0, and the training data is released as MedChain-R1-data.

MTP — Speculative Decoding: No

Model Files

File Name Quant Type File Size File Link Description
MedChain-R1-4B.BF16.gguf BF16 8.42 GB Link Full BF16 weights. Highest quality, largest file size.
MedChain-R1-4B.Q3_K_L.gguf Q3_K_L 2.49 GB Link Lower quality but usable, good for low RAM availability.
MedChain-R1-4B.Q3_K_M.gguf Q3_K_M 2.3 GB Link Low quality.
MedChain-R1-4B.Q4_K_M.gguf Q4_K_M 2.74 GB Link Good quality, default size for most use cases, recommended.
MedChain-R1-4B.Q4_K_S.gguf Q4_K_S 2.57 GB Link Slightly lower quality with more space savings, recommended.
MedChain-R1-4B.Q5_K_M.gguf Q5_K_M 3.09 GB Link High quality, recommended.
MedChain-R1-4B.Q5_K_S.gguf Q5_K_S 2.99 GB Link High quality, recommended.
MedChain-R1-4B.Q6_K.gguf Q6_K 3.46 GB Link Very high quality, near perfect, recommended.
MedChain-R1-4B.mmproj-bf16.gguf mmproj-bf16 676 MB Link Multimodal projection file in BF16 format. Used for vision/language models.

llama.cpp

LLM inference in C/C++ — https://github.com/ggml-org/llama.cpp

Quantized using llama.cpp by prithivMLmods.