File size: 7,615 Bytes
0fd8942 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | # S1-VL-32B:科学多模态推理模型
[中文版](./README_zh.md) | [English](./README.md)
## 🔬 模型简介
**S1-VL-32B** 是由中国科学院 “磐石 · 科学基础大模型” ScienceOne 团队研发的面向科学领域的多模态大语言模型,原生支持 **Multimodal Reasoning(多模态推理)** 与 **Thinking with Images(图像思考)** 两种推理范式,在多项主流科学多模态评测基准上达到当前最优水平。
- **Multimodal Reasoning 模式**:基于思维链的多模态科学推理,适用于复杂多步问题的分析与求解。
- **Thinking with Images 模式**:允许模型在推理过程中在思考过程中主动调用代码工具进行图像操作(包括裁剪、放缩、图像增强、画框标注、描点标记等)再生成回答。
我们建立**跨学科体系的数据处理管道**对视觉推理轨迹进行多维度效用评估与筛选,确保训练推理轨迹的质量;并采用多阶段后训练流程逐步解锁S1-VL-32B 模型的科学推理能力:
- 首先,基于涵盖**数理化天地生**等多学科的大规模多模态指令数据进行混合训练,提升模型科学视觉理解和逻辑推理能力,使模型在学术图像问答、医学影像分析、化学结构识别等方面奠定坚实基础;
- 然后,引入 **Thinking with Images** 推理范式,通过高质量**科学推理数据退火**,使模型具备在推理过程中通过代码进行**图像操作**的能力,在需要精细化图像分析的场景中表现尤为突出,尤其擅长解读密集科学图表、高分辨率遥感图像、显微图像及天文观测数据等复杂视觉场景。
## 📂 模型权重
| 模型名称 | 参数量 | HuggingFace | ModelScope |
|--------|------|-------------|------------|
| S1-VL-32B | 32B | 🤗 [下载](https://huggingface.co/ScienceOne-AI/S1-VL-32B) | 🤖 [下载](https://modelscope.cn/models/ScienceOne-AI/S1-VL-32B) |
## 🏆 评测结果
本次评测共涵盖 **2大维度**、**13个基准**。**科学多模态推理**方向涵盖 MMMU、SFE、MathVision、Physics、ScienceOlympiad、VRSBench-MINI、GMAI-MMBench 和 Galaxy-10-DECaLS,覆盖数学、物理、医学、遥感、天文等多个专业领域;**图像操作推理**方向则包含 HRBench-4K、HRBench-8K、MME-RealWorld-CN、MME-RealWorld-Lite 和 V*,重点考察模型在高分辨率图像理解与真实场景视觉推理中的表现。
<div align="center">
<img src="./image/s1-vl-32b-benchmark.png"/>
</div>
S1-VL-32B 在上述评测中展现出突出的综合竞争力。在**科学多模态推理**任务中,模型在 MMMU、MathVision、VRSBench-MINI 等多个权威基准上优势显著,整体性能超越基座模型 Qwen3-VL-32B,并与更大参数规模的开源模型(如 Qwen3-VL-235B、Intern-S1)以及闭源旗舰模型(如 Gemini 2.5 Pro、GPT-5)保持相当的竞争力;在**图像操作推理**任务中,S1-VL-32B 在全部五项基准评测中均位列第一,全面领先于同规模及更大规模模型,同时优于 Thyme-VL、Skywork-R1V4 等 “Thinking with Images” 专有模型,充分验证了其在 32B 参数规模下实现高效且高质量多模态推理的能力。
## 🧠 案例展示
以下展示 S1-VL-32B 在 **Thinking with Images** 模式下的推理案例。S1-VL-32B在处理一张低分辨率的颈部CT图像的思考过程中主动调用代码工具,对目标区域进行**裁剪与放大**,获取更清晰的局部图像后,再结合模型内部知识完成推理。
<div align="center">
<img src="./image/s1-vl-32b-twi.png"/>
</div>
📁 更多案例详见 [CASES.md](./CASES.md) 文件。
## 🚀 快速开始
### 1. 安装依赖
```bash
# 需要 vLLM >= 0.11.0
pip install -U vllm
pip install qwen-vl-utils==0.0.14
```
### 2. 启动 vLLM 服务
```bash
vllm serve ScienceOne-AI/S1-VL-32B \
--tensor-parallel-size 4 \
--max-model-len 32768 \
--limit-mm-per-prompt image=15 \
--reasoning-parser deepseek_r1 \
--enable-prefix-caching \
--gpu-memory-utilization 0.95 \
--port 9200
```
### 3. Multimodal Reasoning 模式
```python
from openai import OpenAI
import base64
client = OpenAI(api_key="EMPTY", base_url="http://localhost:9200/v1")
with open("path/to/your/image.png", "rb") as f:
image_data = base64.b64encode(f.read()).decode("utf-8")
response = client.chat.completions.create(
model="ScienceOne-AI/S1-VL-32B",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}},
{"type": "text", "text": "请描述图中所示的物理现象并推导相关方程。"},
],
}
],
temperature=0.2,
max_tokens=16384,
)
# 推理过程在 reasoning_content 字段中
print("思考过程:\n", response.choices[0].message.reasoning_content)
print("\n最终答案:\n", response.choices[0].message.content)
```
### 4. Thinking with Images 模式
Thinking with Images 模式需要部署**代码沙箱**,以支持模型在推理过程中调用代码工具实现图像操作(裁剪、放缩、增强、标注等)。
#### Step 1:部署代码沙箱
推荐使用 Docker 部署 AIO Sandbox:
```bash
git clone https://github.com/agent-infra/sandbox
cd sandbox
# 将宿主机图片目录挂载到容器内
docker run -d \
--name twi-sandbox \
-p 18081:18081 \
-v /data/images:/mnt/data/images \ # 宿主机路径 → 沙箱内路径
sandbox:latest
```
挂载路径需与 FastAPI 服务中的路径配置保持一致。
#### Step 2:启动 Thinking with Images FastAPI 服务
下载 [twi_server.py](twi_server.py),修改文件顶部的路径配置:
```python
CHAT_API = "http://localhost:9200/v1/chat/completions" # vLLM 地址
JUPYTER_API = "http://localhost:18081/v1/jupyter" # 沙箱地址
HOST_IMG_DIR = "/data/images" # ← 宿主机图片目录(需与 docker -v 挂载一致)
```
启动服务:
```bash
pip install fastapi uvicorn httpx pillow
python twi_server.py # 监听 10044 端口
```
#### Step 3:调用 Thinking with Images 接口
```python
import httpx
import base64
with open("path/to/your/image.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("utf-8")
messages = [
{"type": "text", "text": "请仔细分析这张科学图像。"},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}},
]
response = httpx.post(
"http://localhost:10044/process",
json={
"messages": messages,
"image_path_list": ["/data/images/your_image.png"], # 宿主机绝对路径
},
timeout=300,
)
result = response.json()
# 最终答案为最后一条 role="assistant" 的消息
final = [m for m in result["messages"] if m["role"] == "assistant"][-1]
print(final["content"])
```
## 📄 引用
如果您在研究中使用了 S1-VL-32B,欢迎引用(相关论文即将发布,敬请期待):
```latex
@misc{s1vl2026,
title = {S1-VL-32B: Scientific Multimodal Reasoning Model},
author = {ScienceOne Team},
year = {2026},
howpublished = {\url{https://huggingface.co/ScienceOne-AI/S1-VL-32B}}
}
```
## 📜 开源协议
本项目基于 Apache 2.0 LICENSE 开源发布。
## 🙏 致谢
感谢 [Qwen3-VL](https://modelscope.cn/collections/Qwen3-VL-5c7a94c8cb144b)、[AIO Sandbox](https://github.com/agent-infra/sandbox) 等开源社区和先驱工作为 S1-VL-32B 科学多模态推理的研究工作奠定的基础。
|