alt.freeweights.text / X-Reasoner-7B
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject:

X-Reasoner-7B

Date: 2026-11-15Commit: 4d2111dSigned: 2DC28CC7B26A283B ✓

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

8.3B params16.6GBX-Reasoner-7Bsafetensorspermissive
FactsParams8.3BSize16.6 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get microsoft/X-Reasoner-7B
# manifest sha256 17701acfb936… · 16.6 GB · 17 files
$ fw verify ./X-Reasoner-7B microsoft/X-Reasoner-7B
From sourceHosted (signed)microsoft/X-Reasoner-7BLast check: 2026-11-15 03:30 UTC

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

Fine-tune of Qwen2.5-VL-7B-Instruct.

Works with

Overview

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

Original release from the publisher.

Base model: Qwen/Qwen2.5-VL-7B-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:30 UTCpassed

Model card

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

Introduction#

We introduce X-Reasoner, a vision-language model posttrained solely on general-domain text for generalizable reasoning, using a twostage approach: an initial supervised fine-tuning phase with distilled long chainof-thoughts, followed by reinforcement learning with verifiable rewards. Experiments show that X-Reasoner successfully transfers reasoning capabilities to both multimodal and out-of-domain settings, outperforming existing state-of-theart models trained with in-domain and multimodal data across various general and medical benchmarks. More details can be found in the paper: X-Reasoner: Towards Generalizable Reasoning Across Modalities and Domains

Requirements#

We recommend installing the transformers version 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 X-Reasoner with 🤗 Transformers or vLLM.

Inference with HF Transformers 🤗

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

import torch
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info

# default: Load the model on the available device(s)
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    "microsoft/X-Reasoner-7B", dtype=torch.bfloat16, device_map="auto"
)

# We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
# model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
#     "microsoft/X-Reasoner",
#     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/X-Reasoner-7B", min_pixels=min_pixels, max_pixels=max_pixels)

# Multiple Choice Query
messages = [
    {
        "role": "user",
        "content": [
           
            {"type": "text", "text": "You should provide your thoughts within <think> </think> tags, then answer with just one of the options below within <answer> </answer> tags (For example, if the question is \n'Is the earth flat?\n A: Yes \nB: No', you should answer with <think>...</think> <answer>B: No</answer>). \nHere is the question:"},
             {
                "type": "image",
                "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
            },
            {"type": "text", "text": "Is there a dog in the image? A. Yes B. No"},
        ],
    }
]

# 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 X-Reasoner-7B 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/X-Reasoner-7B", min_pixels=min_pixels, max_pixels=max_pixels)

llm = LLM(
    model="microsoft/X-Reasoner-7B",
    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.6,
    max_tokens=4000,
)

image_data = []



# Multiple Choice Query
image_data = ['https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg']
messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "image": image_data[0],
            },
            {"type": "text", "text": "You should provide your thoughts within <think> </think> tags, then answer with just one of the options below within <answer> </answer> tags (For example, if the question is \n'Is the earth flat?\n A: Yes \nB: No', you should answer with <think>...</think> <answer>B: No</answer>). \nHere is the question: Is there a dog in the picture? A: Yes B: No"},
        ],
    }
]

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)
Known Issues#
  • In case the model generates non-stopping reasoning trace, we add </think> as a stop token to the assistant output and re-run to generate the final answer.

Citation#

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

@misc{liu2025xreasonergeneralizablereasoningmodalities,
      title={X-Reasoner: Towards Generalizable Reasoning Across Modalities and Domains}, 
      author={Qianchu Liu and Sheng Zhang and Guanghui Qin and Timothy Ossowski and Yu Gu and Ying Jin and Sid Kiblawi and Sam Preston and Mu Wei and Paul Vozila and Tristan Naumann and Hoifung Poon},
      year={2025},
      eprint={2505.03981},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2505.03981}, 
}

Files

17 files · 16.6 GBWeights 16.6 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 17 files with their sha256
FileSizesha256
.gitattributes6.81 KBdf5fc031093eb2000b9c1e06c79d3d9b0eb4539d39dd1be37bb697920cfd2f75
README.md6.53 KB1b6600ca68f644d8d9767cba433b95c4b89b3c3cf3d386156f9c8647f5077178
added_tokens.json605 B58b54bbe36fc752f79a24a271ef66a0a0830054b4dfad94bde757d851968060b
chat_template.json1.05 KB94174d7176c52a7192f96fc34eb2cf23c7c2059d63cdbfadca1586ba89731fb7
config.json1.49 KB619f6c8b180c811d1b515c5f4351ace1ef327881091050874acbe9264265794f
generation_config.json121 B434676baf6b0e9da847d0dc8b274a77182960cb12a052a4973befe35c7a40307
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00004.safetensors4.94 GB4e0223cb291961beb7e66eee34221a3170adfb977e7b75339850da33ff6ba643
model-00002-of-00004.safetensors4.87 GBb1d07c796b12a1096714e9bfbbcbff4050d71441dba5db25db7153846943848f
model-00003-of-00004.safetensors4.34 GBa3b84f8494210d196d97107452b6bef421469233e1e3b7050f021ffad2612f5a
model-00004-of-00004.safetensors2.44 GBc18aa84ffb2579699c636736f52ba8b8e221d1af7cf94e74b880d32b8504fcfd
model.safetensors.index.json57.6 KBb6b7574c2113fc1bbdff2b42df2c315d9edba2933bc37d01c132a52517882ec7
preprocessor_config.json763 Bc1c9d43adb750cc52f317b130734fefa8edba78a5814066f6c10ecc1826e98af
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json11.4 MB9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
tokenizer_config.json7.32 KBeac491c899ab739c577352b5c15e1e8e6f6077fa3733226d964eeb00d74d8de2
vocab.json2.78 MBca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
4d2111d617 pinned now2026-11-15 03:30 UTC17 files · 16.6 GB

Use it

$ fw get microsoft/X-Reasoner-7B
# manifest sha256 17701acfb936… · 16.6 GB · 17 files
$ fw verify ./X-Reasoner-7B microsoft/X-Reasoner-7B
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/X-Reasoner-7B.json --dir ./X-Reasoner-7B $ python3 fw.py verify ./X-Reasoner-7B ./microsoft__X-Reasoner-7B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/X-Reasoner-7B --revision 4d2111d617e5b9633978d99bc2a9380f80996607 --local-dir ./X-Reasoner-7B
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/X-Reasoner-7B", revision="4d2111d617e5b9633978d99bc2a9380f80996607") model = AutoModelForImageTextToText.from_pretrained("microsoft/X-Reasoner-7B", revision="4d2111d617e5b9633978d99bc2a9380f80996607", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve microsoft/X-Reasoner-7B --revision 4d2111d617e5b9633978d99bc2a9380f80996607

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
1b6600ca68f644d8d9767cba433b95c4b89b3c3cf3d386156f9c8647f5077178
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: X-Reasoner-7BDate: 2026-11-15Commit: 4d2111dSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/X-Reasoner-7B
Pinned commit
4d2111d617e5b9633978d99bc2a9380f80996607
Manifest
X-Reasoner-7B.json · .minisig
Manifest sha256
17701acfb93630ae87b665a8f15cd43bae857f3514798877656fc124036a47b9
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:30 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/X-Reasoner-7B.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/X-Reasoner-7B.json.minisig $ minisign -Vm X-Reasoner-7B.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/Qwen2.5-VL-7B-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/X-Reasoner-7B
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. X-Reasoner-7B.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