Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
multimodal
scientific
protein
rna
dna
molecule
weather
medical-imaging
conversational
Instructions to use sais-org/MKB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sais-org/MKB with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sais-org/MKB") 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("sais-org/MKB") model = AutoModelForMultimodalLM.from_pretrained("sais-org/MKB", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sais-org/MKB with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sais-org/MKB" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sais-org/MKB", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/sais-org/MKB
- SGLang
How to use sais-org/MKB with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sais-org/MKB" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sais-org/MKB", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sais-org/MKB" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sais-org/MKB", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use sais-org/MKB with Docker Model Runner:
docker model run hf.co/sais-org/MKB
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +166 -0
- chat_template.jinja +120 -0
- config.json +343 -0
- generation_config.json +14 -0
- model.safetensors +3 -0
- processor_config.json +65 -0
- tokenizer.json +3 -0
- tokenizer_config.json +37 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,169 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
+
tags:
|
| 6 |
+
- multimodal
|
| 7 |
+
- scientific
|
| 8 |
+
- protein
|
| 9 |
+
- rna
|
| 10 |
+
- dna
|
| 11 |
+
- molecule
|
| 12 |
+
- weather
|
| 13 |
+
- medical-imaging
|
| 14 |
+
base_model:
|
| 15 |
+
- Qwen/Qwen3-VL-8B-Instruct
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
<div align="center">
|
| 19 |
+
|
| 20 |
+
[🤗 Model](https://huggingface.co/sais-org/Polaris_Pro>) • [💻 GitHub](https://github.com/Shanghai-Academy-of-AI-For-Science/Polaris-Pro) • [📜 Technical Report (coming soon)](#) • [⚖️ License: Apache-2.0](./LICENSE)
|
| 21 |
+
|
| 22 |
+
</div>
|
| 23 |
+
|
| 24 |
+
# Polaris-Pro
|
| 25 |
+
|
| 26 |
+
**Polaris-Pro is a unified scientific multimodal foundation model** that
|
| 27 |
+
supports scientific **understanding and generation** across Earth science,
|
| 28 |
+
proteins, RNA, DNA, and small molecules within a single **8B** model. Native
|
| 29 |
+
scientific encoders/decoders wrap a shared **Qwen3-VL-8B-Instruct** backbone, so
|
| 30 |
+
heterogeneous scientific data (sequences, molecular graphs, gridded physical
|
| 31 |
+
fields, medical images) are reasoned about and generated in one representation
|
| 32 |
+
space — natural language in and out, no per-task fine-tuning.
|
| 33 |
+
|
| 34 |
+
> 📜 **Technical report coming soon.**
|
| 35 |
+
|
| 36 |
+
## Key features
|
| 37 |
+
|
| 38 |
+
- **Unified understanding *and* generation** across 7 modalities through one
|
| 39 |
+
natural-language interface.
|
| 40 |
+
- **Seven modalities, one 8B backbone** (protein / RNA / DNA / molecule /
|
| 41 |
+
weather / medical-image / text) via a modality router.
|
| 42 |
+
- **Native scientific encoders/decoders** (ESM-2, RNA/DNA ConvFormers, molecular
|
| 43 |
+
graph encoder, Swin-ViT weather tower, SAM-based image path) preserve domain
|
| 44 |
+
structure a generic tokenizer would destroy.
|
| 45 |
+
|
| 46 |
+
## Capabilities
|
| 47 |
+
|
| 48 |
+
| Modality | Understanding | Generation |
|
| 49 |
+
|:--------------|:-------------:|:----------:|
|
| 50 |
+
| Protein | ✅ | — |
|
| 51 |
+
| RNA | ✅ | ✅ |
|
| 52 |
+
| DNA | ✅ | — |
|
| 53 |
+
| Molecule | ✅ | ✅ |
|
| 54 |
+
| Weather | — | ✅ |
|
| 55 |
+
| Medical image | — | ✅ |
|
| 56 |
+
| Text | ✅ | ✅ |
|
| 57 |
+
|
| 58 |
+
<sub>**Understanding** = classification / regression / scientific QA. **Generation**: RNA sequence design · Molecule text → SMILES · Weather 10-day global ERA5 0.25° forecast · Medical-image text-prompted segmentation (needs SAM 3).</sub>
|
| 59 |
+
|
| 60 |
+
## Benchmarks
|
| 61 |
+
|
| 62 |
+
**Polaris-Pro** (**8B**) vs **Biology-Instructions** (Llama-3.1-**8B**, text-token,
|
| 63 |
+
no scientific encoders) and **Intern-S1-Pro** (**~1T** MoE scientific model).
|
| 64 |
+
**Bold** = best; <u>underline</u> = second-best.
|
| 65 |
+
|
| 66 |
+
### Biological sequence understanding
|
| 67 |
+
|
| 68 |
+
| Task | Metric | Polaris-Pro (8B) | Biology-Instructions (8B) | Intern-S1-Pro (~1T) |
|
| 69 |
+
|:-----|:------:|:----------------:|:-------------------------:|:-------------------:|
|
| 70 |
+
| DNA · Epigenetic marks (EMP) | MCC | **71.99** | 3.64 | <u>14.02</u> |
|
| 71 |
+
| DNA · Promoter det. 300bp (PD300) | MCC | **91.17** | 58.18 | <u>82.65</u> |
|
| 72 |
+
| DNA · Core-promoter (CPD) | MCC | **66.35** | 44.54 | <u>54.60</u> |
|
| 73 |
+
| DNA · Enhancer activity (EA) | PCC | 52.64 | <u>53.28</u> | **55.16** |
|
| 74 |
+
| RNA · ncRNA function | Acc | **91.46** | <u>63.09</u> | 34.50 |
|
| 75 |
+
| RNA · Modification | AUC | **96.03** | <u>59.06</u> | 57.77 |
|
| 76 |
+
| RNA · APA isoform | R² | <u>79.87</u> | 59.01 | **82.95** |
|
| 77 |
+
| RNA · CRISPR on-target | Spearman ρ | **28.76** | -0.02 | <u>15.69</u> |
|
| 78 |
+
| Protein · Stability | Spearman ρ | **70.63** | 60.25 | <u>60.82</u> |
|
| 79 |
+
| Protein · Fluorescence | Spearman ρ | <u>70.12</u> | 2.57 | **78.14** |
|
| 80 |
+
| Protein · Enzyme Commission | Fmax | <u>68.65</u> | 19.79 | **72.70** |
|
| 81 |
+
| Protein · Solubility | Acc | <u>67.26</u> | 63.02 | **67.60** |
|
| 82 |
+
| Cross-modal · RPI (RNA–protein) | MCC | **76.49** | <u>74.26</u> | 58.51 |
|
| 83 |
+
| Cross-modal · AAN (antibody–antigen) | MCC | <u>42.96</u> | 1.06 | **44.76** |
|
| 84 |
+
| Cross-modal · EPI (enhancer–promoter) | MCC | <u>-0.03</u> | **3.37** | -1.30 |
|
| 85 |
+
|
| 86 |
+
<sub>Aggregate over 20 biological-understanding benchmarks: Polaris-Pro matches or beats the ~1T Intern-S1-Pro on 10/20 and the same-scale 8B text-token baseline on 16/20.</sub>
|
| 87 |
+
|
| 88 |
+
### Molecule understanding (SMolInstruct)
|
| 89 |
+
|
| 90 |
+
| Task | Metric | Polaris-Pro (8B) | LlaSMol |
|
| 91 |
+
|:-----|:------:|:----------------:|:-------:|
|
| 92 |
+
| BBBP | Acc | **96.95** | 74.60 |
|
| 93 |
+
| HIV | Acc | **97.00** | 96.70 |
|
| 94 |
+
| SIDER | Acc | **71.00** | 70.70 |
|
| 95 |
+
| ClinTox | Acc | 92.36 | **93.10** |
|
| 96 |
+
| ESOL | RMSE ↓ | **0.550** | 1.150 |
|
| 97 |
+
| Lipophilicity | RMSE ↓ | **0.628** | 1.010 |
|
| 98 |
+
|
| 99 |
+
### Earth-science forecasting — vs ECMWF HRES (day-10, global ERA5 0.25°)
|
| 100 |
+
|
| 101 |
+
| Variable | Metric | Polaris-Pro (8B) | ECMWF HRES (NWP) |
|
| 102 |
+
|:---------|:------:|:----------------:|:----------------:|
|
| 103 |
+
| Z500 | RMSE ↓ | **≈740** | ≈810 |
|
| 104 |
+
| T2M | RMSE ↓ (K) | **≈2.65** | ≈2.90 |
|
| 105 |
+
| MSL | RMSE ↓ (Pa) | **≈680** | ≈745 |
|
| 106 |
+
|
| 107 |
+
<sub>Polaris-Pro tracks or beats the operational physics-based HRES system, with the advantage growing at longer lead times.</sub>
|
| 108 |
+
|
| 109 |
+
### Medical-image segmentation
|
| 110 |
+
|
| 111 |
+
Mean Dice (%) on the BiomedParse test splits, 102,855 image–prompt pairs across
|
| 112 |
+
nine imaging modalities, versus six modality-native segmentation specialists.
|
| 113 |
+
|
| 114 |
+
| Modality | # Samples | Polaris-Pro | BiomedParse | MedSAM | SAM | SAM3 | DINO+MedSAM | DINO+SAM |
|
| 115 |
+
|:---------|----------:|:-----------:|:-----------:|:------:|:---:|:----:|:-----------:|:--------:|
|
| 116 |
+
| **All** | 102,855 | **91.20** | <u>90.73</u> | 83.55 | 71.29 | 35.40 | 15.37 | 15.10 |
|
| 117 |
+
| CT | 45,306 | **93.36** | <u>92.25</u> | 83.87 | 74.10 | 28.93 | 9.59 | 10.34 |
|
| 118 |
+
| MRI | 30,990 | **85.29** | <u>85.25</u> | 75.90 | 68.34 | 53.64 | 13.28 | 12.39 |
|
| 119 |
+
| OCT | 283 | <u>85.31</u> | **86.63** | 56.26 | 55.99 | 8.69 | 6.68 | 6.98 |
|
| 120 |
+
| X-ray | 13,840 | <u>98.02</u> | **98.28** | 97.75 | 81.35 | 39.96 | 37.22 | 30.63 |
|
| 121 |
+
| Dermoscopy | 65 | **98.08** | 97.11 | <u>97.35</u> | 88.23 | 51.47 | 81.28 | 78.29 |
|
| 122 |
+
| Endoscopy | 410 | **97.39** | 96.77 | <u>97.05</u> | 92.88 | 38.82 | 25.01 | 24.54 |
|
| 123 |
+
| Fundus | 800 | <u>91.33</u> | **91.50** | 88.06 | 57.16 | 18.58 | 3.19 | 2.73 |
|
| 124 |
+
| Pathology | 977 | **87.29** | <u>81.57</u> | 43.44 | 42.06 | 26.08 | 25.38 | 24.69 |
|
| 125 |
+
| Ultrasound | 10,184 | <u>90.54</u> | **91.03** | 89.76 | 57.47 | 5.23 | 17.12 | 22.91 |
|
| 126 |
+
|
| 127 |
+
<sub>Best overall Dice (All), and best on CT, MRI, pathology, dermoscopy, and endoscopy; on the four modalities where BiomedParse leads, the gap is ≤ 0.5 Dice.</sub>
|
| 128 |
+
|
| 129 |
+
## Usage
|
| 130 |
+
|
| 131 |
+
Runs via the accompanying code repository (custom multimodal architecture).
|
| 132 |
+
|
| 133 |
+
```bash
|
| 134 |
+
git clone <GITHUB_REPO> && cd polaris-pro
|
| 135 |
+
pip install -r requirements.txt # Python 3.10; transformers==5.0.0
|
| 136 |
+
hf download <THIS_REPO> --local-dir ./model
|
| 137 |
+
|
| 138 |
+
export PYTHONPATH=$PWD/code
|
| 139 |
+
python code/inference.py --model_path model --greedy --max_new_tokens 64 \
|
| 140 |
+
--rna "GGATGCGATCATGTCTGCACTAACACACCGGATCCCATCAGAACTCCG" \
|
| 141 |
+
--system "You are a non-coding RNA family classifier. Output only the family name, no other text." \
|
| 142 |
+
--prompt $'<rna>\nWhich family does this non-coding RNA sequence belong to?'
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
All scientific encoder/decoder weights (ESM-2, the Suiren molecular graph
|
| 146 |
+
encoder, the RNA/DNA ConvFormers, and the Swin-ViT weather tower) are embedded
|
| 147 |
+
in `model.safetensors`. The only separate download is **SAM 3** for
|
| 148 |
+
medical-image segmentation, under Meta's gated license.
|
| 149 |
+
|
| 150 |
+
Each task has a specific `--system` prompt that fixes the output format; see
|
| 151 |
+
`run_examples.sh` in the repository for per-task examples, weather, and segmentation.
|
| 152 |
+
|
| 153 |
+
## License
|
| 154 |
+
|
| 155 |
+
Apache-2.0. Built on Qwen3-VL (Apache-2.0); includes merged ESM-2 (MIT) and
|
| 156 |
+
Polaris/Suiren-derived encoders. **Medical-image segmentation needs SAM 3,
|
| 157 |
+
under Meta's separate gated license — not distributed here.** See
|
| 158 |
+
`THIRD_PARTY_LICENSES.md` / `NOTICE` in the code repository.
|
| 159 |
+
|
| 160 |
+
## Citation
|
| 161 |
+
|
| 162 |
+
```bibtex
|
| 163 |
+
@misc{polarispro2026,
|
| 164 |
+
title = {Polaris-Pro: A Unified Scientific Multimodal Foundation Model},
|
| 165 |
+
author = {Hesen Chen and Xinyu Su and Xiaomeng Yang and Yuetan Lin and Zixiong Yang and Zhiyu Tan and Hao Li},
|
| 166 |
+
year = {2026},
|
| 167 |
+
note = {https://huggingface.co/sais-org/Polaris_Pro}
|
| 168 |
+
}
|
| 169 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0].role == 'system' %}
|
| 4 |
+
{%- if messages[0].content is string %}
|
| 5 |
+
{{- messages[0].content }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{%- for content in messages[0].content %}
|
| 8 |
+
{%- if 'text' in content %}
|
| 9 |
+
{{- content.text }}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{%- endfor %}
|
| 12 |
+
{%- endif %}
|
| 13 |
+
{{- '\n\n' }}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 16 |
+
{%- for tool in tools %}
|
| 17 |
+
{{- "\n" }}
|
| 18 |
+
{{- tool | tojson }}
|
| 19 |
+
{%- endfor %}
|
| 20 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 21 |
+
{%- else %}
|
| 22 |
+
{%- if messages[0].role == 'system' %}
|
| 23 |
+
{{- '<|im_start|>system\n' }}
|
| 24 |
+
{%- if messages[0].content is string %}
|
| 25 |
+
{{- messages[0].content }}
|
| 26 |
+
{%- else %}
|
| 27 |
+
{%- for content in messages[0].content %}
|
| 28 |
+
{%- if 'text' in content %}
|
| 29 |
+
{{- content.text }}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- endfor %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '<|im_end|>\n' }}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endif %}
|
| 36 |
+
{%- set image_count = namespace(value=0) %}
|
| 37 |
+
{%- set video_count = namespace(value=0) %}
|
| 38 |
+
{%- for message in messages %}
|
| 39 |
+
{%- if message.role == "user" %}
|
| 40 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 41 |
+
{%- if message.content is string %}
|
| 42 |
+
{{- message.content }}
|
| 43 |
+
{%- else %}
|
| 44 |
+
{%- for content in message.content %}
|
| 45 |
+
{%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
|
| 46 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 47 |
+
{%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
|
| 48 |
+
<|vision_start|><|image_pad|><|vision_end|>
|
| 49 |
+
{%- elif content.type == 'video' or 'video' in content %}
|
| 50 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 51 |
+
{%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
|
| 52 |
+
<|vision_start|><|video_pad|><|vision_end|>
|
| 53 |
+
{%- elif 'text' in content %}
|
| 54 |
+
{{- content.text }}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- endfor %}
|
| 57 |
+
{%- endif %}
|
| 58 |
+
{{- '<|im_end|>\n' }}
|
| 59 |
+
{%- elif message.role == "assistant" %}
|
| 60 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 61 |
+
{%- if message.content is string %}
|
| 62 |
+
{{- message.content }}
|
| 63 |
+
{%- else %}
|
| 64 |
+
{%- for content_item in message.content %}
|
| 65 |
+
{%- if 'text' in content_item %}
|
| 66 |
+
{{- content_item.text }}
|
| 67 |
+
{%- endif %}
|
| 68 |
+
{%- endfor %}
|
| 69 |
+
{%- endif %}
|
| 70 |
+
{%- if message.tool_calls %}
|
| 71 |
+
{%- for tool_call in message.tool_calls %}
|
| 72 |
+
{%- if (loop.first and message.content) or (not loop.first) %}
|
| 73 |
+
{{- '\n' }}
|
| 74 |
+
{%- endif %}
|
| 75 |
+
{%- if tool_call.function %}
|
| 76 |
+
{%- set tool_call = tool_call.function %}
|
| 77 |
+
{%- endif %}
|
| 78 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 79 |
+
{{- tool_call.name }}
|
| 80 |
+
{{- '", "arguments": ' }}
|
| 81 |
+
{%- if tool_call.arguments is string %}
|
| 82 |
+
{{- tool_call.arguments }}
|
| 83 |
+
{%- else %}
|
| 84 |
+
{{- tool_call.arguments | tojson }}
|
| 85 |
+
{%- endif %}
|
| 86 |
+
{{- '}\n</tool_call>' }}
|
| 87 |
+
{%- endfor %}
|
| 88 |
+
{%- endif %}
|
| 89 |
+
{{- '<|im_end|>\n' }}
|
| 90 |
+
{%- elif message.role == "tool" %}
|
| 91 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 92 |
+
{{- '<|im_start|>user' }}
|
| 93 |
+
{%- endif %}
|
| 94 |
+
{{- '\n<tool_response>\n' }}
|
| 95 |
+
{%- if message.content is string %}
|
| 96 |
+
{{- message.content }}
|
| 97 |
+
{%- else %}
|
| 98 |
+
{%- for content in message.content %}
|
| 99 |
+
{%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
|
| 100 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 101 |
+
{%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
|
| 102 |
+
<|vision_start|><|image_pad|><|vision_end|>
|
| 103 |
+
{%- elif content.type == 'video' or 'video' in content %}
|
| 104 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 105 |
+
{%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
|
| 106 |
+
<|vision_start|><|video_pad|><|vision_end|>
|
| 107 |
+
{%- elif 'text' in content %}
|
| 108 |
+
{{- content.text }}
|
| 109 |
+
{%- endif %}
|
| 110 |
+
{%- endfor %}
|
| 111 |
+
{%- endif %}
|
| 112 |
+
{{- '\n</tool_response>' }}
|
| 113 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 114 |
+
{{- '<|im_end|>\n' }}
|
| 115 |
+
{%- endif %}
|
| 116 |
+
{%- endif %}
|
| 117 |
+
{%- endfor %}
|
| 118 |
+
{%- if add_generation_prompt %}
|
| 119 |
+
{{- '<|im_start|>assistant\n' }}
|
| 120 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"bio_token_ids": {
|
| 6 |
+
"_bio_seq_output_pad": {
|
| 7 |
+
"pad": 151687
|
| 8 |
+
},
|
| 9 |
+
"contact_map": {
|
| 10 |
+
"end": 151682,
|
| 11 |
+
"pad": 151683,
|
| 12 |
+
"start": 151681
|
| 13 |
+
},
|
| 14 |
+
"dna": {
|
| 15 |
+
"end": 151673,
|
| 16 |
+
"pad": 151674,
|
| 17 |
+
"start": 151672
|
| 18 |
+
},
|
| 19 |
+
"mol": {
|
| 20 |
+
"end": 151679,
|
| 21 |
+
"pad": 151680,
|
| 22 |
+
"start": 151678
|
| 23 |
+
},
|
| 24 |
+
"protein": {
|
| 25 |
+
"end": 151676,
|
| 26 |
+
"pad": 151677,
|
| 27 |
+
"start": 151675
|
| 28 |
+
},
|
| 29 |
+
"rna": {
|
| 30 |
+
"end": 151670,
|
| 31 |
+
"pad": 151671,
|
| 32 |
+
"start": 151669
|
| 33 |
+
},
|
| 34 |
+
"weather": {
|
| 35 |
+
"end": 151685,
|
| 36 |
+
"pad": 151686,
|
| 37 |
+
"start": 151684
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
"bos_token_id": null,
|
| 41 |
+
"dna_config": {
|
| 42 |
+
"_name_or_path": "",
|
| 43 |
+
"architectures": null,
|
| 44 |
+
"chunk_size_feed_forward": 0,
|
| 45 |
+
"conv_kernel_size": 7,
|
| 46 |
+
"dna_encoder_hidden_size": 512,
|
| 47 |
+
"dna_encoder_path": "dna",
|
| 48 |
+
"dna_max_seq_length": 2048,
|
| 49 |
+
"dna_projector_hidden_size": 2048,
|
| 50 |
+
"dna_vocab_size": 8,
|
| 51 |
+
"dropout": 0.1,
|
| 52 |
+
"dtype": null,
|
| 53 |
+
"id2label": {
|
| 54 |
+
"0": "LABEL_0",
|
| 55 |
+
"1": "LABEL_1"
|
| 56 |
+
},
|
| 57 |
+
"is_encoder_decoder": false,
|
| 58 |
+
"label2id": {
|
| 59 |
+
"LABEL_0": 0,
|
| 60 |
+
"LABEL_1": 1
|
| 61 |
+
},
|
| 62 |
+
"model_type": "qwen3_vl_dna",
|
| 63 |
+
"num_attention_heads": 8,
|
| 64 |
+
"num_encoder_layers": 8,
|
| 65 |
+
"num_latent_tokens": 64,
|
| 66 |
+
"output_attentions": false,
|
| 67 |
+
"output_hidden_states": false,
|
| 68 |
+
"problem_type": null,
|
| 69 |
+
"return_dict": true
|
| 70 |
+
},
|
| 71 |
+
"dtype": "bfloat16",
|
| 72 |
+
"eos_token_id": 151645,
|
| 73 |
+
"epi_ohem_enable": false,
|
| 74 |
+
"epi_ohem_hard_fraction": 0.5,
|
| 75 |
+
"epi_ohem_weight": 2.0,
|
| 76 |
+
"image_token_id": 151655,
|
| 77 |
+
"med_seg_config": {
|
| 78 |
+
"cost_bbox": 5.0,
|
| 79 |
+
"cost_class": 2.0,
|
| 80 |
+
"cost_dice": 5.0,
|
| 81 |
+
"cost_giou": 2.0,
|
| 82 |
+
"cost_mask": 5.0,
|
| 83 |
+
"focal_alpha": 0.25,
|
| 84 |
+
"focal_gamma": 2.0,
|
| 85 |
+
"freeze_sam3": true,
|
| 86 |
+
"freeze_sam3_vision": false,
|
| 87 |
+
"loss_w_bbox_giou": 0.5,
|
| 88 |
+
"loss_w_bbox_l1": 0.5,
|
| 89 |
+
"loss_w_cls": 1.0,
|
| 90 |
+
"loss_w_mask_dice": 5.0,
|
| 91 |
+
"loss_w_mask_dice_high": 0.0,
|
| 92 |
+
"loss_w_mask_focal": 2.0,
|
| 93 |
+
"loss_w_mask_semantic": 0.5,
|
| 94 |
+
"loss_w_meta_ce": 0.2,
|
| 95 |
+
"mask_cost_res": 128,
|
| 96 |
+
"mask_h": 576,
|
| 97 |
+
"mask_loss_target_res": null,
|
| 98 |
+
"mask_w": 576,
|
| 99 |
+
"med_query_end_id": null,
|
| 100 |
+
"med_query_start_id": null,
|
| 101 |
+
"meta_num_classes": 15,
|
| 102 |
+
"proj_hidden_mult": 2,
|
| 103 |
+
"proj_mlp": true,
|
| 104 |
+
"sam3_model_path": null,
|
| 105 |
+
"sam3_text_dim": 256,
|
| 106 |
+
"system_prompt": "You are a medical imaging assistant specialized in image understanding for segmentation.\nYou will be provided with (1) a medical image and (2) a text query that specifies a target region to segment.\nYour goal is to produce a detailed, clinically plausible description that helps delineate the target region precisely.\nPlease describe:\n 1) The imaging modality/type if it is evident (e.g., CT, MRI, ultrasound, X-ray, endoscopy, dermoscopy, histopathology). If uncertain, explicitly say it is unknown.\n 2) The overall field of view and orientation (e.g., axial/sagittal/coronal for cross-sectional images, or a general view if not applicable).\n 3) The main anatomical structures/organs visible, and for each one provide approximate location using spatial terms. (left/right, superior/inferior, anterior/posterior, central/peripheral) and relative relationships between organs.\n 4) Most importantly, focus on the structure mentioned in the text query: describe its approximate position, boundaries, shape, size, and its appearance (intensity/color, texture, homogeneity, and contrast to surrounding tissues).\n Be concise but detailed, use precise spatial language, and emphasize features helpful for pixel-accurate segmentation.",
|
| 107 |
+
"upsample_mask_loss": false,
|
| 108 |
+
"use_query_special_tokens": false
|
| 109 |
+
},
|
| 110 |
+
"med_seg_freeze_qwen": true,
|
| 111 |
+
"med_seg_visual_fp32": false,
|
| 112 |
+
"modality_configs": {},
|
| 113 |
+
"model_type": "qwen3_vl",
|
| 114 |
+
"mol_config": {
|
| 115 |
+
"_name_or_path": "",
|
| 116 |
+
"architectures": null,
|
| 117 |
+
"chunk_size_feed_forward": 0,
|
| 118 |
+
"dropout": 0.1,
|
| 119 |
+
"dtype": null,
|
| 120 |
+
"freeze_gnn": true,
|
| 121 |
+
"freeze_mol_gnn": true,
|
| 122 |
+
"gnn_drop_ratio": 0.0,
|
| 123 |
+
"id2label": {
|
| 124 |
+
"0": "LABEL_0",
|
| 125 |
+
"1": "LABEL_1"
|
| 126 |
+
},
|
| 127 |
+
"is_encoder_decoder": false,
|
| 128 |
+
"label2id": {
|
| 129 |
+
"LABEL_0": 0,
|
| 130 |
+
"LABEL_1": 1
|
| 131 |
+
},
|
| 132 |
+
"model_type": "qwen3_vl_mol",
|
| 133 |
+
"mol_decoder_hidden_size": 768,
|
| 134 |
+
"mol_decoder_max_seq_length": 512,
|
| 135 |
+
"mol_decoder_num_heads": 12,
|
| 136 |
+
"mol_decoder_num_layers": 6,
|
| 137 |
+
"mol_encoder_hidden_size": 256,
|
| 138 |
+
"mol_encoder_path": "mol",
|
| 139 |
+
"mol_projector_hidden_size": 1024,
|
| 140 |
+
"mol_vocab_size": 226,
|
| 141 |
+
"num_gnn_layers": 12,
|
| 142 |
+
"num_latent_tokens": 64,
|
| 143 |
+
"num_resampler_heads": 8,
|
| 144 |
+
"output_attentions": false,
|
| 145 |
+
"output_hidden_states": false,
|
| 146 |
+
"problem_type": null,
|
| 147 |
+
"return_dict": true
|
| 148 |
+
},
|
| 149 |
+
"pad_token_id": 151643,
|
| 150 |
+
"protein_config": {
|
| 151 |
+
"_name_or_path": "",
|
| 152 |
+
"architectures": null,
|
| 153 |
+
"chunk_size_feed_forward": 0,
|
| 154 |
+
"conv_kernel_size": 7,
|
| 155 |
+
"dropout": 0.1,
|
| 156 |
+
"dtype": null,
|
| 157 |
+
"esmc_model_name": "esm2_t30_150M_UR50D",
|
| 158 |
+
"freeze_backbone": true,
|
| 159 |
+
"freeze_esmc": true,
|
| 160 |
+
"freeze_protein_backbone": true,
|
| 161 |
+
"id2label": {
|
| 162 |
+
"0": "LABEL_0",
|
| 163 |
+
"1": "LABEL_1"
|
| 164 |
+
},
|
| 165 |
+
"is_encoder_decoder": false,
|
| 166 |
+
"label2id": {
|
| 167 |
+
"LABEL_0": 0,
|
| 168 |
+
"LABEL_1": 1
|
| 169 |
+
},
|
| 170 |
+
"model_type": "qwen3_vl_protein",
|
| 171 |
+
"num_attention_heads": 8,
|
| 172 |
+
"num_encoder_layers": 12,
|
| 173 |
+
"num_latent_tokens": 64,
|
| 174 |
+
"num_resampler_layers": 2,
|
| 175 |
+
"output_attentions": false,
|
| 176 |
+
"output_hidden_states": false,
|
| 177 |
+
"problem_type": null,
|
| 178 |
+
"protein_backbone_name": "esm2_t30_150M_UR50D",
|
| 179 |
+
"protein_convformer_vocab_size": 33,
|
| 180 |
+
"protein_encoder_hidden_size": 640,
|
| 181 |
+
"protein_encoder_path": "protein",
|
| 182 |
+
"protein_max_seq_length": 8192,
|
| 183 |
+
"protein_projector_hidden_size": 2560,
|
| 184 |
+
"protein_vocab_size": 31,
|
| 185 |
+
"return_dict": true,
|
| 186 |
+
"use_physicochemical_embed": true
|
| 187 |
+
},
|
| 188 |
+
"rna_config": {
|
| 189 |
+
"_name_or_path": "",
|
| 190 |
+
"architectures": null,
|
| 191 |
+
"chunk_size_feed_forward": 0,
|
| 192 |
+
"conv_kernel_size": 7,
|
| 193 |
+
"dropout": 0.1,
|
| 194 |
+
"dtype": null,
|
| 195 |
+
"id2label": {
|
| 196 |
+
"0": "LABEL_0",
|
| 197 |
+
"1": "LABEL_1"
|
| 198 |
+
},
|
| 199 |
+
"is_encoder_decoder": false,
|
| 200 |
+
"label2id": {
|
| 201 |
+
"LABEL_0": 0,
|
| 202 |
+
"LABEL_1": 1
|
| 203 |
+
},
|
| 204 |
+
"model_type": "qwen3_vl_rna",
|
| 205 |
+
"num_attention_heads": 8,
|
| 206 |
+
"num_encoder_layers": 8,
|
| 207 |
+
"num_latent_tokens": 64,
|
| 208 |
+
"output_attentions": false,
|
| 209 |
+
"output_hidden_states": false,
|
| 210 |
+
"problem_type": null,
|
| 211 |
+
"return_dict": true,
|
| 212 |
+
"rna_encoder_hidden_size": 512,
|
| 213 |
+
"rna_encoder_path": "rna",
|
| 214 |
+
"rna_max_seq_length": 4096,
|
| 215 |
+
"rna_projector_hidden_size": 2048,
|
| 216 |
+
"rna_vocab_size": 8
|
| 217 |
+
},
|
| 218 |
+
"text_config": {
|
| 219 |
+
"attention_bias": false,
|
| 220 |
+
"attention_dropout": 0.0,
|
| 221 |
+
"bos_token_id": 151643,
|
| 222 |
+
"dtype": "bfloat16",
|
| 223 |
+
"eos_token_id": 151645,
|
| 224 |
+
"head_dim": 128,
|
| 225 |
+
"hidden_act": "silu",
|
| 226 |
+
"hidden_size": 4096,
|
| 227 |
+
"initializer_range": 0.02,
|
| 228 |
+
"intermediate_size": 12288,
|
| 229 |
+
"max_position_embeddings": 262144,
|
| 230 |
+
"model_type": "qwen3_vl_text",
|
| 231 |
+
"num_attention_heads": 32,
|
| 232 |
+
"num_hidden_layers": 36,
|
| 233 |
+
"num_key_value_heads": 8,
|
| 234 |
+
"rms_norm_eps": 1e-06,
|
| 235 |
+
"rope_parameters": {
|
| 236 |
+
"mrope_interleaved": true,
|
| 237 |
+
"mrope_section": [
|
| 238 |
+
24,
|
| 239 |
+
20,
|
| 240 |
+
20
|
| 241 |
+
],
|
| 242 |
+
"rope_theta": 5000000,
|
| 243 |
+
"rope_type": "default"
|
| 244 |
+
},
|
| 245 |
+
"rope_theta": 5000000,
|
| 246 |
+
"tie_word_embeddings": false,
|
| 247 |
+
"use_cache": true,
|
| 248 |
+
"vocab_size": 151936
|
| 249 |
+
},
|
| 250 |
+
"text_loss_weight": 1.0,
|
| 251 |
+
"tie_word_embeddings": false,
|
| 252 |
+
"transformers_version": "5.0.0",
|
| 253 |
+
"use_cache": false,
|
| 254 |
+
"video_token_id": 151656,
|
| 255 |
+
"vision_config": {
|
| 256 |
+
"deepstack_visual_indexes": [
|
| 257 |
+
8,
|
| 258 |
+
16,
|
| 259 |
+
24
|
| 260 |
+
],
|
| 261 |
+
"depth": 27,
|
| 262 |
+
"dtype": "bfloat16",
|
| 263 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 264 |
+
"hidden_size": 1152,
|
| 265 |
+
"in_channels": 3,
|
| 266 |
+
"initializer_range": 0.02,
|
| 267 |
+
"intermediate_size": 4304,
|
| 268 |
+
"model_type": "qwen3_vl",
|
| 269 |
+
"num_heads": 16,
|
| 270 |
+
"num_position_embeddings": 2304,
|
| 271 |
+
"out_hidden_size": 4096,
|
| 272 |
+
"patch_size": 16,
|
| 273 |
+
"spatial_merge_size": 2,
|
| 274 |
+
"temporal_patch_size": 2
|
| 275 |
+
},
|
| 276 |
+
"vision_end_token_id": 151653,
|
| 277 |
+
"vision_start_token_id": 151652,
|
| 278 |
+
"weather_config": {
|
| 279 |
+
"_name_or_path": "",
|
| 280 |
+
"architectures": null,
|
| 281 |
+
"attn_type": "flash",
|
| 282 |
+
"chunk_size_feed_forward": 0,
|
| 283 |
+
"const_chans": 6,
|
| 284 |
+
"decoder_depth": 12,
|
| 285 |
+
"dtype": null,
|
| 286 |
+
"embed_freq": 256,
|
| 287 |
+
"embed_mode": "add",
|
| 288 |
+
"embed_types": [
|
| 289 |
+
"step",
|
| 290 |
+
"hour",
|
| 291 |
+
"doy",
|
| 292 |
+
"lead_hour"
|
| 293 |
+
],
|
| 294 |
+
"encoder_depth": 12,
|
| 295 |
+
"ffn_type": "geglu_ffn",
|
| 296 |
+
"frame_interval": "6h",
|
| 297 |
+
"hidden_size": 2048,
|
| 298 |
+
"id2label": {
|
| 299 |
+
"0": "LABEL_0",
|
| 300 |
+
"1": "LABEL_1"
|
| 301 |
+
},
|
| 302 |
+
"image_size": [
|
| 303 |
+
721,
|
| 304 |
+
1440
|
| 305 |
+
],
|
| 306 |
+
"in_chans": 70,
|
| 307 |
+
"in_frames": 1,
|
| 308 |
+
"is_encoder_decoder": false,
|
| 309 |
+
"label2id": {
|
| 310 |
+
"LABEL_0": 0,
|
| 311 |
+
"LABEL_1": 1
|
| 312 |
+
},
|
| 313 |
+
"lead_hour_scaling": true,
|
| 314 |
+
"lower_chans": 0,
|
| 315 |
+
"mask_type": "h",
|
| 316 |
+
"max_rollout_steps": 200,
|
| 317 |
+
"meteo_data_path": null,
|
| 318 |
+
"meteo_loss_coef": 1.0,
|
| 319 |
+
"meteo_loss_type": "l1_channel",
|
| 320 |
+
"meteo_loss_weight": 1.0,
|
| 321 |
+
"meteo_out_channels": 70,
|
| 322 |
+
"meteo_output_size": [
|
| 323 |
+
721,
|
| 324 |
+
1440
|
| 325 |
+
],
|
| 326 |
+
"meteo_token_id": 151655,
|
| 327 |
+
"mlp_ratio": 4.0,
|
| 328 |
+
"model_type": "qwen3_vl_weather",
|
| 329 |
+
"n_kv_heads": null,
|
| 330 |
+
"norm_type": "adarms",
|
| 331 |
+
"num_heads": 32,
|
| 332 |
+
"output_attentions": false,
|
| 333 |
+
"output_hidden_states": false,
|
| 334 |
+
"patch_size": 6,
|
| 335 |
+
"pl_chans": null,
|
| 336 |
+
"problem_type": null,
|
| 337 |
+
"qwenvl_dim": 4096,
|
| 338 |
+
"return_dict": true,
|
| 339 |
+
"time_embed_dropout": 0.0,
|
| 340 |
+
"upper_chans": 70,
|
| 341 |
+
"window_size": 20
|
| 342 |
+
}
|
| 343 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_sample": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151645,
|
| 5 |
+
151645,
|
| 6 |
+
151643
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 151643,
|
| 9 |
+
"repetition_penalty": 1.0,
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
+
"top_k": 20,
|
| 12 |
+
"top_p": 0.8,
|
| 13 |
+
"transformers_version": "5.0.0"
|
| 14 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8bd9d8ccdde5b14d2daea4b6d43103093063a9bb26dc2b56518fe729a32c0bb0
|
| 3 |
+
size 23422026570
|
processor_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"data_format": "channels_first",
|
| 4 |
+
"do_convert_rgb": true,
|
| 5 |
+
"do_normalize": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_processor_type": "Qwen2VLImageProcessorFast",
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"max_pixels": 50176,
|
| 20 |
+
"merge_size": 2,
|
| 21 |
+
"min_pixels": 784,
|
| 22 |
+
"patch_size": 16,
|
| 23 |
+
"resample": 3,
|
| 24 |
+
"rescale_factor": 0.00392156862745098,
|
| 25 |
+
"size": {
|
| 26 |
+
"longest_edge": 50176,
|
| 27 |
+
"shortest_edge": 784
|
| 28 |
+
},
|
| 29 |
+
"temporal_patch_size": 2
|
| 30 |
+
},
|
| 31 |
+
"processor_class": "Qwen3VLProcessor",
|
| 32 |
+
"video_processor": {
|
| 33 |
+
"data_format": "channels_first",
|
| 34 |
+
"default_to_square": true,
|
| 35 |
+
"do_convert_rgb": true,
|
| 36 |
+
"do_normalize": true,
|
| 37 |
+
"do_rescale": true,
|
| 38 |
+
"do_resize": true,
|
| 39 |
+
"do_sample_frames": true,
|
| 40 |
+
"fps": 2,
|
| 41 |
+
"image_mean": [
|
| 42 |
+
0.5,
|
| 43 |
+
0.5,
|
| 44 |
+
0.5
|
| 45 |
+
],
|
| 46 |
+
"image_std": [
|
| 47 |
+
0.5,
|
| 48 |
+
0.5,
|
| 49 |
+
0.5
|
| 50 |
+
],
|
| 51 |
+
"max_frames": 8,
|
| 52 |
+
"merge_size": 2,
|
| 53 |
+
"min_frames": 4,
|
| 54 |
+
"patch_size": 16,
|
| 55 |
+
"resample": 3,
|
| 56 |
+
"rescale_factor": 0.00392156862745098,
|
| 57 |
+
"return_metadata": false,
|
| 58 |
+
"size": {
|
| 59 |
+
"longest_edge": 802816,
|
| 60 |
+
"shortest_edge": 200704
|
| 61 |
+
},
|
| 62 |
+
"temporal_patch_size": 2,
|
| 63 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 64 |
+
}
|
| 65 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa662d183d411d13f6d7ef66e068bdfe8b4036ae5ba985cecf6ea4853c3891d0
|
| 3 |
+
size 11426274
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|rna_start|>",
|
| 10 |
+
"<|rna_end|>",
|
| 11 |
+
"<|rna_pad|>",
|
| 12 |
+
"<|dna_start|>",
|
| 13 |
+
"<|dna_end|>",
|
| 14 |
+
"<|dna_pad|>",
|
| 15 |
+
"<|protein_start|>",
|
| 16 |
+
"<|protein_end|>",
|
| 17 |
+
"<|protein_pad|>",
|
| 18 |
+
"<|mol_start|>",
|
| 19 |
+
"<|mol_end|>",
|
| 20 |
+
"<|mol_pad|>",
|
| 21 |
+
"<|contact_start|>",
|
| 22 |
+
"<|contact_end|>",
|
| 23 |
+
"<|contact_pad|>",
|
| 24 |
+
"<|weather_start|>",
|
| 25 |
+
"<|weather_end|>",
|
| 26 |
+
"<|weather_pad|>",
|
| 27 |
+
"<|bio_seq_pad|>"
|
| 28 |
+
],
|
| 29 |
+
"is_local": true,
|
| 30 |
+
"model_max_length": 8192,
|
| 31 |
+
"pad_token": "<|endoftext|>",
|
| 32 |
+
"padding_side": "right",
|
| 33 |
+
"processor_class": "Qwen3VLProcessor",
|
| 34 |
+
"split_special_tokens": false,
|
| 35 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 36 |
+
"unk_token": null
|
| 37 |
+
}
|