Run this model with HF Jobs

Run ifms111/UniReason-Med on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/ifms111/UniReason-Med. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ifms111/UniReason-Med on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/ifms111/UniReason-Med. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/ifms111/UniReason-Med. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="ifms111/UniReason-Med")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("ifms111/UniReason-Med")
model = AutoModelForMultimodalLM.from_pretrained("ifms111/UniReason-Med", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

UniReason-Med

UniReason-Med is a medical multimodal model for grounded reasoning over 2D medical images and slice-serialized 3D volumes.

It studies whether grounded reasoning supervision from abundant 2D medical images can improve 3D medical VQA when both modalities share a common reasoning interface. A single checkpoint processes either a 2D image or a 3D volume serialized as ordered slices, generating interleaved textual reasoning and localized visual evidence through shared bounding-box syntax and region-token injection.

Model Description

UniReason-Med is trained to interleave free-form reasoning with localized visual evidence. During reasoning, the model emits bounding boxes over the input image; the referenced region is cropped and re-injected as additional visual context for the next reasoning step. The same shared interface is applied to 2D images and to 3D volumes serialized as ordered slice sequences.

Training

The model is built with supervised fine-tuning followed by GRPO reinforcement learning. RL uses answer-correctness and format rewards rather than ground-truth localization-overlap rewards such as IoU or Dice.

Intended Use and Limitations

  • Intended use: research on medical multimodal reasoning, visual grounding, and 2D-to-3D transfer.
  • Out of scope: this is a research artifact and is not a medical device. It must not be used for clinical diagnosis, treatment decisions, or real patient care.
  • Limitations: outputs may be incorrect, incomplete, or biased; predicted bounding boxes are reasoning aids, not validated localization.

License

Released under the Apache License 2.0, consistent with the base model Qwen2.5-VL-7B-Instruct.

Downloads last month
8
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ifms111/UniReason-Med

Finetuned
(1,301)
this model

Dataset used to train ifms111/UniReason-Med