From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject:

UniRG-CXR

Date: 2026-11-15Commit: cd5a95fSigned: 2DC28CC7B26A283B ✓

Image text to text model with 8.8B parameters. Safetensors weights, 17.6 GB in all. Published by microsoft under Apache-2.0.

8.8B params17.6GBUniRG-CXRsafetensorspermissive
FactsParams8.8BSize17.6 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get microsoft/UniRG-CXR
# manifest sha256 2bc561a12cd1… · 17.6 GB · 18 files
$ fw verify ./UniRG-CXR microsoft/UniRG-CXR
From sourceHosted (signed)microsoft/UniRG-CXRLast check: 2026-11-15 03:35 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of Qwen3-VL-8B-Instruct.

Works with

Overview

Size
17.6 GB
Weights
17.5 GB (safetensors)
Parameters
8.8B
Formats
safetensors
Task
image text to text
License
Apache-2.0 (permissive)
Files
18, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Base model: Qwen/Qwen3-VL-8B-Instruct

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:35 UTCpassed

Model card

From the publisher at commit cd5a95f. Shown as plain text with links; images open at the publisher.

Introduction#

We introduce UniRG-CXR, a radiology report generation model that obtains SOTA performance on ReXrank. More details can be found in the paper: Scaling medical imaging report generation with multimodal reinforcement learning

Requirements#

We recommend installing the transformers version with python=3.12 used in our experiments and other dependencies with this command:

pip install transformers==4.57.1 accelerate==1.12.0 torchvision==0.24.1 qwen-vl-utils==0.0.14

Quickstart#

Below, we provide a some examples to show how to use UniRG-CXR with 🤗 Transformers or vLLM.

Inference with HF Transformers 🤗

Here we show a code snippet to show you how chat with UniRG-CXR using transformers and qwen_vl_utils:

import torch
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info

# default: Load the model on the available device(s)
model = Qwen3VLForConditionalGeneration.from_pretrained(
    "microsoft/UniRG-CXR", dtype=torch.bfloat16, device_map="auto"
)

# We recommend enabling flash_attention_2 for better acceleration and memory saving.
# model = Qwen3VLForConditionalGeneration.from_pretrained(
#     "microsoft/UniRG-CXR",
#     dtype=torch.bfloat16,
#     attn_implementation="flash_attention_2",
#     device_map="auto",
# )

# You can set min_pixels and max_pixels according to your needs.
min_pixels = 262144
max_pixels = 262144
processor = AutoProcessor.from_pretrained("microsoft/UniRG-CXR", min_pixels=min_pixels, max_pixels=max_pixels)

messages = [
    {
        "role": "user",
        "content": [
  
            {"type": "text", "text": "This is a radiology report generation task. Here is the context:"},
            {
                "type": "image",
                "image": "<input your image path here>",
            },  
            {"type": "text", "text": "Given the image and the context, directly provide the report in the following format:\nFindings: [write the findings] Impression: [write the impression]\nNow write the report in the format above."},

        ],
    }
]

# Preparation for inference
text = processor.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
    text=[text],
    images=image_inputs,
    videos=video_inputs,
    padding=True,
    return_tensors="pt",
)

        
inputs = inputs.to(device="cuda")

# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=4000)
generated_ids_trimmed = [
    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)

Inference with vLLM

Here we show an example of how to use UniRG-CXR with vLLM (tested with vllm==0.11.2 and transformers==4.57.1):

from vllm import LLM, SamplingParams
from transformers import AutoProcessor

min_pixels = 262144
max_pixels = 262144
processor = AutoProcessor.from_pretrained("microsoft/UniRG-CXR", min_pixels=min_pixels, max_pixels=max_pixels)

llm = LLM(
    model="microsoft/UniRG-CXR",
    trust_remote_code=True,
    dtype="bfloat16",
    max_model_len=8192,
    tensor_parallel_size=4,
    gpu_memory_utilization=0.8,
    limit_mm_per_prompt={"image": 1}
)

# Set up sampling parameters
sampling_params = SamplingParams(
    temperature=0.0,
    max_tokens=4000,
)

image_data = []



image_data = ['Your image path']
messages = [
    {
        "role": "user",
        "content": [
  
            {"type": "text", "text": "This is a radiology report generation task. Here is the context:"},
            {
                "type": "image",
                "image": image_data[0],
            },  
            {"type": "text", "text": "Given the image and the context, directly provide the report in the following format:\nFindings: [write the findings] Impression: [write the impression]\nNow write the report in the format above."},

        ],
    }
]

prompt = processor.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True)

if image_data:
    mm_prompt = {
        "prompt": prompt,
        "multi_modal_data": {"image": image_data}
    }
else:
    mm_prompt = {"prompt": prompt}

# Generate response
outputs = llm.generate([mm_prompt], sampling_params)

# Print the generated response
for output in outputs:
    prompt = output.prompt
    generated_text = output.outputs[0].text
    print(f"Prompt: {prompt}")
    print(f"Generated text: {generated_text}")
    print("-" * 50)

Citation#

If you find our work helpful, feel free to give us a cite.

@article{liu2026scaling,
  title={Scaling medical imaging report generation with multimodal reinforcement learning},
  author={Liu, Qianchu and Zhang, Sheng and Qin, Guanghui and Gu, Yu and Jin, Ying and Preston, Sam and Xu, Yanbo and Kiblawi, Sid and Yim, Wen-wai and Ossowski, Tim and others},
  journal={arXiv preprint arXiv:2601.17151},
  year={2026}
}

Notices#

Microsoft's Privacy Statement: https://go.microsoft.com/fwlink/?LinkId=521839.

Files

18 files · 17.6 GBWeights 17.5 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 18 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md5.52 KB0591281d6094bc1523bf4c91dbb07b5027c8002f0753b75d8173f8690cc76fab
added_tokens.json707 Bc0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680
chat_template.jinja5.29 KB3636d0f0bd6bef02654cdffdc447b79cb2cef8ab02cc75267345946291a489e4
config.json1.61 KB7c51ef28f14bf0e62950a7818fc8357bdc35449317bb487219c9423a8cabd089
generation_config.json169 B8bfa82dd87e47985b7df13b703a492c7d8c8be2e30970e8adb2b201b4929ce8b
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00004.safetensors4.94 GB3e6e69f74088f404fc484528c8c79ddee2400ab892ab9d4d868d756d1908210e
model-00002-of-00004.safetensors5.00 GBea01295c64f2baa3144d2e064c1cae12660e649d58dc47c83f8d339922ee44fd
model-00003-of-00004.safetensors4.93 GBc8c8cd2f6a8377d916e75c805b74356a694fd659a6f8504668fffcc36828e25c
model-00004-of-00004.safetensors2.66 GBd31669d25ee2fb2eeeb8e2370bbb5e3d8ea2e73ae8038cef923fe421a4d62afd
model.safetensors.index.json67.8 KB6f65a47d8d79dfd7ca0eb73543430f8ce2432ec797c57406964462bef9f366ce
preprocessor_config.json782 B93585062a80db5e8ca038efc7726a3e6411d9db948472d81d63c6303993be8c5
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json11.4 MBaeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
tokenizer_config.json5.49 KBd47c9b82deba785d116e750acdd71d3a9c52979693d1f5a2e048b02eb3cd34a1
video_preprocessor_config.json817 B59c5c9eb52182eb14c06ffb10ca9effd29adce5f238a95de23ca14a38dbd2cb1
vocab.json2.78 MBca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
cd5a95fa83 pinned now2026-11-15 03:35 UTC18 files · 17.6 GB

Use it

$ fw get microsoft/UniRG-CXR
# manifest sha256 2bc561a12cd1… · 17.6 GB · 18 files
$ fw verify ./UniRG-CXR microsoft/UniRG-CXR
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/UniRG-CXR.json --dir ./UniRG-CXR $ python3 fw.py verify ./UniRG-CXR ./microsoft__UniRG-CXR.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/UniRG-CXR --revision cd5a95fa837c92180e14ed0ddd7f079150a2559a --local-dir ./UniRG-CXR
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForImageTextToText, AutoProcessor processor = AutoProcessor.from_pretrained("microsoft/UniRG-CXR", revision="cd5a95fa837c92180e14ed0ddd7f079150a2559a") model = AutoModelForImageTextToText.from_pretrained("microsoft/UniRG-CXR", revision="cd5a95fa837c92180e14ed0ddd7f079150a2559a", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve microsoft/UniRG-CXR --revision cd5a95fa837c92180e14ed0ddd7f079150a2559a

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
0591281d6094bc1523bf4c91dbb07b5027c8002f0753b75d8173f8690cc76fab
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject: UniRG-CXRDate: 2026-11-15Commit: cd5a95fSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/UniRG-CXR
Pinned commit
cd5a95fa837c92180e14ed0ddd7f079150a2559a
Manifest
UniRG-CXR.json · .minisig
Manifest sha256
2bc561a12cd1f889fd937107533752c2548f24d5aac9776c1bf6dffd5c0f23bb
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:35 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/UniRG-CXR.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/UniRG-CXR.json.minisig $ minisign -Vm UniRG-CXR.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Qwen/Qwen3-VL-8B-Instruct · this model is a finetune of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/UniRG-CXR
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. UniRG-CXR.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B