ScienceOne-AI commited on
Commit
d7984f6
·
verified ·
1 Parent(s): 7be449c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +448 -1
README.md CHANGED
@@ -2,4 +2,451 @@
2
  license: apache-2.0
3
  ---
4
 
5
- comming soon...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
3
  ---
4
 
5
+ <div align="center">
6
+
7
+ # S1-Omni
8
+
9
+ **A Unified Scientific Multimodal Reasoning Model**
10
+
11
+ [![Blog](https://img.shields.io/badge/Blog-S1--Omni-blue)](https://scienceone-ai.github.io/S1-Omni)
12
+ [![GitHub](https://img.shields.io/badge/GitHub-S1--Omni-181717?logo=github)](https://github.com/ScienceOne-AI/S1-Omni)
13
+ [![Hugging Face](https://img.shields.io/badge/Hugging%20Face-S1--Omni-yellow)](https://huggingface.co/ScienceOne-AI/S1-Omni)
14
+ [![ModelScope](https://img.shields.io/badge/ModelScope-S1--Omni-624aff)](https://modelscope.cn/models/ScienceOne-AI/S1-Omni)
15
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](代码仓库/S1-Omni-pro/LICENSE)
16
+
17
+ </div>
18
+
19
+ ## 🧬 Model Introduction
20
+
21
+ We present S1-Omni, a unified scientific multimodal reasoning model for scientific understanding, prediction, and generation. It is developed by the ScienceOne AI team of the Chinese Academy of Sciences.
22
+
23
+ S1-Omni addresses fragmented scientific AI capabilities with a shared backbone for cross-disciplinary, cross-modal, and cross-task understanding and reasoning, plus science-specific decoders for verifiable outputs. Unified encoding maps natural-language instructions and typed scientific objects, including material CIFs, chemical SMILES, protein sequences, spectra, and scientific images, into shared task representations. Knowledge alignment integrates scientific laws, experimental facts, and expert knowledge into data construction, validation, and training, grounding judgments in evidence. Task-oriented decoding converts the representations into verifiable outputs through specialized decoders for property prediction, spectrum-to-structure reconstruction, protein site and structure prediction, and scientific image generation and editing.
24
+
25
+ S1-Omni is built around three core capabilities:
26
+
27
+ - **Unified Representation of Scientific Data**: The model jointly organizes natural-language instructions and diverse scientific objects into a unified task representation, covering scientific modalities including text, material CIFs, chemical SMILES, protein sequences, spectra, and scientific images. At the same time, it preserves the type boundaries, representational structures, and necessary encoding pathways of different objects.
28
+ - **Natural-World Knowledge Alignment**: Model training relies not only on statistical associations between inputs and outputs, but also incorporates scientific laws, experimental facts, and expert knowledge into data construction, sample validation, and the training process. This enables the model to form intermediate judgments from the scientific evidence available in the current task, strengthening scientific reasoning and interpretability.
29
+ - **Decoding for Domain-Specific Tasks**: Building on shared task understanding and scientific reasoning, the model connects to the appropriate result representation and generation modules according to the specific task objective, allowing a unified model to produce verifiable outputs in each domain's native result space.
30
+
31
+ <div align="center">
32
+ <img src="assets/s1-omni-architecture.png" alt="S1-Omni model architecture" width="95%">
33
+ <br>
34
+ </div>
35
+
36
+ ## 🤗 Model Release
37
+
38
+ Model weights are available from the following platforms:
39
+
40
+ | Platform | URL |
41
+ | --- | --- |
42
+ | Hugging Face | `https://huggingface.co/ScienceOne-AI/S1-Omni` |
43
+ | ModelScope | `https://modelscope.cn/models/ScienceOne-AI/S1-Omni` |
44
+
45
+ The model-weight directory mainly contains:
46
+
47
+ | Type | Files / Directories |
48
+ | --- | --- |
49
+ | Model weights | `model-00001-of-00021.safetensors` to `model-00021-of-00021.safetensors` |
50
+ | Weight index | `model.safetensors.index.json` |
51
+ | Model configuration | `config.json`, `configuration.json`, `generation_config.json` |
52
+ | Tokenizer | `tokenizer.json`, `tokenizer_config.json`, `vocab.json`, `added_tokens.json`, `special_tokens_map.json`, `chat_template.jinja` |
53
+ | Input preprocessing configuration | `processor_config.json`, `preprocessor_config.json`, `video_preprocessor_config.json` |
54
+ | Image decoder configuration | `s1_omni_image_config.json` |
55
+ | Protein-task configuration | `esm2/`, `s1_protein_config.json`, `simplefold_config.json`, `simplefold.safetensors.index.json` |
56
+
57
+ ## 📚 Data Release
58
+
59
+ **S1-Omni-Corpus** is a large-scale training corpus for unified scientific multimodal reasoning. It is organized around heterogeneous scientific data unification, expert-experience-aligned reasoning, and domain-native supervision. The corpus covers mathematics, physics, chemistry, biology, materials science, medicine, geography, astronomy, and computer science, and includes scientific question answering, literature reasoning, molecular and materials property prediction, protein function and binding-site prediction, protein-structure-related tasks, spectrum-to-molecular-structure prediction, and scientific image generation and editing.
60
+
61
+ <div align="center">
62
+ <img src="assets/s1-omni-corpus.png" alt="S1-Omni-Corpus data distribution" width="95%">
63
+ <br>
64
+ </div>
65
+
66
+ The full S1-Omni-Corpus covers over 200 scientific tasks with million-scale reasoning samples. We also release the representative subset **S1-Omni-Corpus-10K**, which is curated from the S1-Omni training corpus and contains **10,468** complete training samples for data-pipeline analysis, task-protocol research, and community reproduction.
67
+
68
+ The open-source data are available from:
69
+
70
+ | Platform | URL |
71
+ | --- | --- |
72
+ | Hugging Face | `https://huggingface.co/datasets/ScienceOne-AI/S1-Omni-Corpus-10K` |
73
+ | ModelScope | `https://modelscope.cn/datasets/ScienceOne-AI/S1-Omni-Corpus-10K` |
74
+
75
+ Each JSONL record contains `data_id`, `messages`, `images`, and `meta`:
76
+
77
+ ```json
78
+ {
79
+ "data_id": "XXXXXX",
80
+ "messages": [
81
+ {
82
+ "role": "user",
83
+ "content": "User question and scientific-object context"
84
+ },
85
+ {
86
+ "role": "assistant",
87
+ "content": "<think>...reasoning process...</think>\n\nModel response and task-specific token"
88
+ }
89
+ ],
90
+ "images": [],
91
+ "meta": {
92
+ "subject": "...",
93
+ "task_type": "...",
94
+ "language": "en",
95
+ "turns": 1,
96
+ "label": null
97
+ }
98
+ }
99
+ ```
100
+
101
+ Field descriptions:
102
+
103
+ - `data_id`: Unique data ID.
104
+ - `messages`: Data content. `role` contains `user` and `assistant`. `content` contains the user prompt and scientific objects.
105
+ - `images`: Relative paths of user-input images. Missing values are represented as `[]`. Image and spectra subsets use `assets/...` paths, while text-only records use `[]`.
106
+ - `meta`: Metadata object containing only `subject`, `task_type`, `language`, `turns`, and `label`.
107
+
108
+ `meta` field descriptions:
109
+
110
+ | Field | Type / Values | Description |
111
+ | --- | --- | --- |
112
+ | `subject` | Discipline | `Chemistry`, `Biology`, `Medicine`, `Materials`, `CS`, `Physics`, `Geography`, `Math`, `Astronomy` |
113
+ | `task_type` | Task type | Examples include `IR spectrum to SMILES prediction`, `Protein PPI binding site prediction`, `Image editing`, etc. |
114
+ | `language` | Sample language | `en` / `zh` |
115
+ | `turns` | int | Number of user turns. `1` means single-turn. |
116
+ | `label` | object / null | Annotation information. When non-null, it contains `type` and `value`; `value` is the decoder output object for the current scientific task. |
117
+
118
+ Task-specific tokens:
119
+
120
+ - `<image_edit>` / `<image_gen>`: Image editing and image generation tasks
121
+ - `<prot_st>` / `<prot_cla>`: Protein structure and protein classification tasks
122
+ - `<linear_pre>` / `<linear_cla>`: Linear prediction and classification tasks
123
+ - `<spectra_st>`: Spectrum-to-molecular-structure prediction task
124
+
125
+ ## 🚀 Quick Start
126
+
127
+ ### 1. Set Up the Inference Environment
128
+
129
+ Enter the inference-code directory:
130
+
131
+ ```bash
132
+ cd S1-Omni/code
133
+ ```
134
+
135
+ Download the reference files required for structure prediction:
136
+
137
+ ```bash
138
+ # Follow the txt file in this directory and download the pt files here.
139
+ cd simplefold_inference_pt
140
+ ```
141
+
142
+ Install the inference environment:
143
+
144
+ ```bash
145
+ cd S1-Omni/code
146
+ bash install.sh
147
+ ```
148
+
149
+ ### 2. Download Weights
150
+
151
+ Download the model weights from Hugging Face or ModelScope and place them in a local checkpoint directory:
152
+
153
+ ```bash
154
+ mkdir -p checkpoints/S1-Omni
155
+ ```
156
+
157
+ Refer to the "Model Release" section and download the complete model weights. The model service loads from the merged-weight directory by default. If the weights are stored elsewhere, specify the path with `--checkpoint_dir` when starting the service. You can also modify the default model path in `s1_omni_infer/infer_s1_omni_checkpoint.py`.
158
+
159
+ ### 3. Start the Model Service
160
+
161
+ Starting S1-Omni requires approximately `2 * 80G` GPU memory. We recommend starting the OpenAI-compatible service from the project directory:
162
+
163
+ ```bash
164
+ python s1_omni_infer/serve_s1_omni_openai.py \
165
+ --checkpoint_dir checkpoints/S1-Omni \
166
+ --host 0.0.0.0 \
167
+ --port 8009 \
168
+ --model_name s1-omni
169
+ ```
170
+
171
+ The default service URL is `http://<host>:8009`. Check service status with:
172
+
173
+ ```bash
174
+ curl http://<host>:8009/health
175
+ ```
176
+
177
+ Main endpoints:
178
+
179
+ | Endpoint | Description |
180
+ | --- | --- |
181
+ | `POST /v1/chat/completions` | OpenAI-compatible chat endpoint. The test script uses this endpoint by default. |
182
+ | `GET /health` | Service health check |
183
+
184
+ ### 4. Request and Response Format
185
+
186
+ The request format is basically compatible with OpenAI Chat Completions:
187
+
188
+ ```json
189
+ {
190
+ "model": "s1-omni",
191
+ "messages": [
192
+ {
193
+ "role": "user",
194
+ "content": [
195
+ {
196
+ "type": "text",
197
+ "text": "User question"
198
+ }
199
+ ]
200
+ }
201
+ ],
202
+ "max_new_tokens": 8192,
203
+ "temperature": 0.2
204
+ }
205
+ ```
206
+
207
+ Response format:
208
+
209
+ ```jsonc
210
+ {
211
+ "id": "chatcmpl-...",
212
+ "object": "chat.completion",
213
+ "created": 1760000000,
214
+ "model": "s1-omni",
215
+ "choices": [
216
+ {
217
+ "index": 0,
218
+ "message": {
219
+ "role": "assistant",
220
+ "content": "Final text returned to the user or generated file path"
221
+ },
222
+ "finish_reason": "stop"
223
+ }
224
+ ],
225
+ "final_text": "Final text returned to the user or generated file path",
226
+ "result": {
227
+ "question": "...",
228
+ "generation_question": "...",
229
+ "llm_output": "...<route_token>",
230
+ "final_special_token": "<route_token>",
231
+ "selected_by": "classification | regression | protein | simplefold | image_gen | image_edit | spectra | unknown",
232
+ "prediction": {
233
+ "...": "..."
234
+ },
235
+ "final_text": "Final text returned to the user or generated scientific-object file path"
236
+ }
237
+ }
238
+ ```
239
+
240
+ For application integration, read the `final_text` field first. `result` keeps the route, raw LLM output, and structured results from task decoders.
241
+
242
+ ### 5. Use the Test Script
243
+
244
+ List built-in task examples:
245
+
246
+ ```bash
247
+ python s1_omni_infer/test_s1_omni_openai_client.py \
248
+ --url http://<host>:8009/v1/chat/completions \
249
+ --list
250
+ ```
251
+
252
+ Run a specified task:
253
+
254
+ ```bash
255
+ python s1_omni_infer/test_s1_omni_openai_client.py \
256
+ --url http://<host>:8009/v1/chat/completions \
257
+ --task protein_site
258
+ ```
259
+
260
+ Start the Gradio visual interface:
261
+
262
+ ```bash
263
+ python s1_omni_infer/s1_omni_openai_gradio.py
264
+ ```
265
+
266
+ ### 6. Task Invocation Examples
267
+
268
+ #### 6.1 Protein Binding-Site Prediction: `protein_site`
269
+
270
+ Request:
271
+
272
+ ```jsonc
273
+ {
274
+ "model": "s1-omni",
275
+ "messages": [
276
+ {
277
+ "role": "user",
278
+ "content": [
279
+ {
280
+ "type": "text",
281
+ "text": "Given protein sequence <PROT>KETAAAKFERQHMDSSTSAASSSNYCNQMMKSRNLTKDRCKPVNTFVHESLADVQAVCSQKNVACKNGQTNCYQSYSTMSITDCRETGSSKYPNCAYKTTQANKHIIVACEGNPYVPVHFDASV</PROT>, predict the residues that form protein-protein interaction (PPI) binding sites."
282
+ }
283
+ ]
284
+ }
285
+ ],
286
+ "max_new_tokens": 8192,
287
+ "temperature": 0.2
288
+ }
289
+ ```
290
+
291
+ #### 6.2 Protein Structure Prediction: `protein_fold`
292
+
293
+ Request:
294
+
295
+ ```jsonc
296
+ {
297
+ "model": "s1-omni",
298
+ "messages": [
299
+ {
300
+ "role": "user",
301
+ "content": [
302
+ {
303
+ "type": "text",
304
+ "text": "You are an assistant for protein modeling. After the user provides a sequence, explain how functional and domain cues affect structure prediction.\n\n<PROT>MLNGISNAASTLGRQLVGIASRVSSAGGTGFSVAPQAVRLTPVRVHSPFSPGSSNVNARTIFNVSSQVTSFTPSRPAPPPPTSGQASGASRPLPPIAQALKDHLAAYELSKASETVNFKPTRPAPPPPTSGQASGASRPLPPIAQALKDHLAAYELSKASETVSFKPTRQAPPPPTSGQASGPGGLPPLAQALKDHLAAYEQSKKG</PROT>"
305
+ }
306
+ ]
307
+ }
308
+ ],
309
+ "max_new_tokens": 8192
310
+ }
311
+ ```
312
+
313
+ #### 6.3 Small-Molecule Property Classification: `property_classification`
314
+
315
+ Request:
316
+
317
+ ```jsonc
318
+ {
319
+ "model": "s1-omni",
320
+ "messages": [
321
+ {
322
+ "role": "user",
323
+ "content": [
324
+ {
325
+ "type": "text",
326
+ "text": "Can <SMILES>CCOP(=O)(OCC)C12CC(C)C=CC1COC2=O</SMILES> be considered active against HIV replication?"
327
+ }
328
+ ]
329
+ }
330
+ ],
331
+ "max_new_tokens": 8192
332
+ }
333
+ ```
334
+
335
+ #### 6.4 Small-Molecule / Materials Property Regression: `property_regression`
336
+
337
+ Request:
338
+
339
+ ```jsonc
340
+ {
341
+ "model": "s1-omni",
342
+ "messages": [
343
+ {
344
+ "role": "user",
345
+ "content": [
346
+ {
347
+ "type": "text",
348
+ "text": "Evaluate the water solubility of <SMILES>C1=CC2=CC=C3C=CC4=CC=C5C=CC6=CC=C1C1=C2C3=C4C5=C61</SMILES> and report the ESOL log S value."
349
+ }
350
+ ]
351
+ }
352
+ ],
353
+ "max_new_tokens": 8192
354
+ }
355
+ ```
356
+
357
+ #### 6.5 Text-to-Image Generation: `image_generation`
358
+
359
+ Request:
360
+
361
+ ```jsonc
362
+ {
363
+ "model": "s1-omni",
364
+ "messages": [
365
+ {
366
+ "role": "user",
367
+ "content": [
368
+ {
369
+ "type": "text",
370
+ "text": "Generate a cross-sectional illustration of the inside of a human cell, with mitochondria, DNA double helix, and ribosomes floating inside, a moist translucent cell membrane, soft cyan, mint green, and light pink colors, flowing liquid cytoplasm, soft glow, a pure white minimalist laboratory background, clean and transparent, biomedical popular-science illustration, flat fine texture, high definition, English text, HD."
371
+ }
372
+ ]
373
+ }
374
+ ],
375
+ "max_new_tokens": 8192
376
+ }
377
+ ```
378
+
379
+ #### 6.6 Image Editing: `image_edit`
380
+
381
+ Request:
382
+
383
+ ```jsonc
384
+ {
385
+ "model": "s1-omni",
386
+ "messages": [
387
+ {
388
+ "role": "user",
389
+ "content": [
390
+ {
391
+ "type": "image_url",
392
+ "image_url": "/path/to/your_image.png"
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "Change the image background color to light brown."
397
+ }
398
+ ]
399
+ }
400
+ ],
401
+ "max_new_tokens": 8192
402
+ }
403
+ ```
404
+
405
+ #### 6.7 Spectrum-to-Molecule Generation: `spectra`
406
+
407
+ Request:
408
+
409
+ ```jsonc
410
+ {
411
+ "model": "s1-omni",
412
+ "messages": [
413
+ {
414
+ "role": "user",
415
+ "content": [
416
+ {
417
+ "type": "jdx_files",
418
+ "jdx_files": [
419
+ "/path/to/000010_ir.jdx",
420
+ "/path/to/000010_raman.jdx",
421
+ "/path/to/000010_uv.jdx"
422
+ ]
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "Predict the possible molecular structure based on the provided infrared, Raman, and UV spectra."
427
+ }
428
+ ]
429
+ }
430
+ ],
431
+ "max_new_tokens": 8192,
432
+ "force_spectra": true
433
+ }
434
+ ```
435
+
436
+ ## 📄 License
437
+
438
+ The code, model weights, and dataset of this project are released under the Apache License 2.0.
439
+
440
+ S1-Omni is released for scientific research scenarios. Scientific tasks may involve experimental conditions, measurement errors, task-protocol differences, and domain-knowledge boundaries. Model outputs should not be used as the sole basis for experimental decisions, clinical judgments, materials screening, or engineering deployment. Critical scientific conclusions should be reviewed together with professional tools, experimental validation, and domain experts.
441
+
442
+ ## 📖 Citation
443
+
444
+ If S1-Omni is useful for your research, please cite our technical report. The formal citation format will be updated after the paper or technical report is released.
445
+
446
+ ```bibtex
447
+ @misc{s1omni2026,
448
+ title = {S1-Omni: A Unified Multimodal Reasoning Model for Scientific Understanding, Prediction, and Generation},
449
+ author = {ScienceOne AI and Wenge AI},
450
+ year = {2026}
451
+ }
452
+ ```