Instructions to use WaveCut/LingBot-Video-MoE-30B-A3B-SDNQ-uint4-static with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use WaveCut/LingBot-Video-MoE-30B-A3B-SDNQ-uint4-static with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("WaveCut/LingBot-Video-MoE-30B-A3B-SDNQ-uint4-static", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- README.md +242 -0
- RUNTIME_ADAPTER.md +21 -0
- model_index.json +24 -0
- model_index.json.bak_lingbot_video_diffusers +24 -0
- processor/README.md +190 -0
- processor/chat_template.json +4 -0
- processor/config.json +63 -0
- processor/configuration.json +1 -0
- processor/generation_config.json +14 -0
- processor/merges.txt +0 -0
- processor/preprocessor_config.json +21 -0
- processor/tokenizer.json +0 -0
- processor/tokenizer_config.json +239 -0
- processor/video_preprocessor_config.json +21 -0
- processor/vocab.json +0 -0
- runtime-requirements.txt +7 -0
- scheduler/scheduler_config.json +6 -0
- scheduling_flow_unipc.py +818 -0
- source_revisions.json +10 -0
- text_encoder/README.md +190 -0
- text_encoder/chat_template.json +4 -0
- text_encoder/config.json +63 -0
- text_encoder/configuration.json +1 -0
- text_encoder/generation_config.json +14 -0
- text_encoder/merges.txt +0 -0
- text_encoder/model-00001-of-00002.safetensors +3 -0
- text_encoder/model-00002-of-00002.safetensors +3 -0
- text_encoder/model.safetensors.index.json +720 -0
- text_encoder/preprocessor_config.json +21 -0
- text_encoder/tokenizer.json +0 -0
- text_encoder/tokenizer_config.json +239 -0
- text_encoder/video_preprocessor_config.json +21 -0
- text_encoder/vocab.json +0 -0
- vae/config.json +56 -0
README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# LingBot-Video
|
| 6 |
+
|
| 7 |
+
**🌐 [Project Page](https://technology.robbyant.com/lingbot-video)** | **🤗 [Hugging Face](https://huggingface.co/collections/robbyant/lingbot-video)** | **🤖 [ModelScope](https://www.modelscope.cn/collections/Robbyant/LingBot-Video)** | **📄 [Paper](https://github.com/Robbyant/lingbot-video/blob/main/paper.pdf)** | **⚖️ [License](LICENSE.txt)**
|
| 8 |
+
|
| 9 |
+
We are excited to introduce **LingBot-Video**, the first open-source large-scale MoE (Mixture-of-Experts) video generation model dedicated to embodied intelligence. As a top-tier video model, LingBot-Video is designed to bridge the gap between video synthesis and physical world understanding.
|
| 10 |
+
|
| 11 |
+
## 🔥 Key Highlights
|
| 12 |
+
|
| 13 |
+
* **🚀 Efficient MoE Architecture**: Scaled from scratch; balanced between capacity and cost with **~3x** faster inference.
|
| 14 |
+
* **📦 Data Engine**: Trained on massive web videos integrated with **70,000+ hours** of embodied data.
|
| 15 |
+
* **⚖️ Multi Reward System**: Rewarded for **high aesthetics**, **physical rationality**, and **task completion**.
|
| 16 |
+
|
| 17 |
+
## 🔥 Latest News
|
| 18 |
+
|
| 19 |
+
- July 9, 2026: 🎉 We release the technical report, code, models, rewriters for LingBot-Video.
|
| 20 |
+
|
| 21 |
+
## 📦 Model Download
|
| 22 |
+
|
| 23 |
+
| Model Name | Components | Tasks | Download |
|
| 24 |
+
| --- | --- | --- | --- |
|
| 25 |
+
| ⚡ LingBot-Video-Dense | Dense (1.3B) | T2I, T2V, TI2V | 🤗 [Huggingface](https://huggingface.co/robbyant/lingbot-video-dense-1.3b) 🤖 [ModelScope](https://www.modelscope.cn/models/Robbyant/lingbot-video-dense-1.3b) |
|
| 26 |
+
| 💪 LingBot-Video-MoE | MoE (30B-A3B) + Refiner | T2I, T2V, TI2V, Refinement | 🤗 [Huggingface](https://huggingface.co/robbyant/lingbot-video-moe-30b-a3b) 🤖 [ModelScope](https://www.modelscope.cn/models/Robbyant/lingbot-video-moe-30b-a3b) |
|
| 27 |
+
| 📝 LingBot-Video-Rewriter-Base | Qwen3.6-27B official | Prompt rewriter (Expand) | 🤗 [Huggingface](https://huggingface.co/Qwen/Qwen3.6-27B) 🤖 [ModelScope](https://www.modelscope.cn/models/Qwen/Qwen3.6-27B) |
|
| 28 |
+
| 📝 LingBot-Video-Rewriter-Adapter | Qwen3.6-27B LoRA | Prompt rewriter (Json) | 🤗 [Huggingface](https://huggingface.co/robbyant/lingbot-video-rewriter-lora) 🤖 [ModelScope](https://www.modelscope.cn/models/Robbyant/lingbot-video-rewriter-lora) |
|
| 29 |
+
|
| 30 |
+
## 🚀 Quick Start
|
| 31 |
+
|
| 32 |
+
### 🛠️ Installation
|
| 33 |
+
|
| 34 |
+
The root `requirements.txt` includes the recommended PyTorch build for LingBot-Video inference.
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
git clone https://github.com/Robbyant/lingbot-video
|
| 38 |
+
cd lingbot-video
|
| 39 |
+
|
| 40 |
+
python -m venv .venv
|
| 41 |
+
source .venv/bin/activate
|
| 42 |
+
python -m pip install -U pip
|
| 43 |
+
|
| 44 |
+
# Base requirements cover direct DiT inference and rewriter --backend transformers.
|
| 45 |
+
pip install -r requirements.txt
|
| 46 |
+
pip install -e .
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
> **💡 Rewriter deployment**: the bundled rewriter uses the single-process
|
| 50 |
+
> `transformers` backend. For higher throughput, deploy the VLM yourself and call
|
| 51 |
+
> it through an OpenAI-compatible API. Preserve the two-stage semantics: step 1
|
| 52 |
+
> must use the base VLM without the rewriter LoRA, while step 2 must use the same
|
| 53 |
+
> base VLM with the rewriter LoRA enabled. This can be implemented with two
|
| 54 |
+
> endpoints, or with one server that can select the adapter per request. See
|
| 55 |
+
> [vLLM](https://docs.vllm.ai) / [SGLang](https://docs.sglang.ai) official docs.
|
| 56 |
+
|
| 57 |
+
Install the optional SGLang dependencies only when using SGLang Diffusion or the
|
| 58 |
+
fused / FP8 MoE runtime:
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
python -m pip install --no-deps -r requirements-sglang.txt
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
Recommended runtime versions:
|
| 65 |
+
|
| 66 |
+
| Package | Version |
|
| 67 |
+
| --- | --- |
|
| 68 |
+
| `Python` | `>=3.10` |
|
| 69 |
+
| `torch` | `2.12.0.dev20260220+cu130` (recommended) |
|
| 70 |
+
| `torchvision` | `0.26.0.dev20260220+cu130` (recommended) |
|
| 71 |
+
| `transformers` | `5.8.1` |
|
| 72 |
+
| `diffusers` | `0.39.0` |
|
| 73 |
+
| `peft` | `0.19.1` |
|
| 74 |
+
| `json_repair` | `>=0.30` |
|
| 75 |
+
| `decord` | `>=0.6.0` |
|
| 76 |
+
| `safetensors` | `>=0.4.5` |
|
| 77 |
+
|
| 78 |
+
### 🎬 Inference
|
| 79 |
+
|
| 80 |
+
#### 🧭 Recommended Inference Workflow
|
| 81 |
+
|
| 82 |
+
LingBot-Video DiT inference is designed to consume structured JSON captions,
|
| 83 |
+
not casual natural-language prompts. The recommended public workflow is:
|
| 84 |
+
|
| 85 |
+
1. Rewrite the user's plain prompt with
|
| 86 |
+
Prompt Rewriter.
|
| 87 |
+
For TI2V, pass the same first frame to the rewriter.
|
| 88 |
+
2. Run Auto Negative by
|
| 89 |
+
default to prune the negative prompt for this specific caption.
|
| 90 |
+
3. Run the unified inference runner with `--prompt_json` and select direct
|
| 91 |
+
diffusers or SGLang Diffusion through `--backend`.
|
| 92 |
+
|
| 93 |
+
Backend choices:
|
| 94 |
+
|
| 95 |
+
- `diffusers`: direct diffusers reference path.
|
| 96 |
+
- `sglang`: SGLang Diffusion path. If the optional SGLang package is not
|
| 97 |
+
installed, it automatically falls back to direct diffusers and prints a
|
| 98 |
+
warning. Install `requirements-sglang.txt` to enable the SGLang runtime.
|
| 99 |
+
|
| 100 |
+
For multi-GPU inference, add `--enable_fsdp_inference` to shard the base DiT and
|
| 101 |
+
refiner DiT on GPU. This reduces GPU memory pressure after loading, but each
|
| 102 |
+
rank still constructs the transformer on host memory before FSDP sharding; make
|
| 103 |
+
sure the machine has enough system RAM for large MoE checkpoints.
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
# Model root (released Dense or MoE package) and rewriter weights.
|
| 107 |
+
export MODEL_DIR="<path_to_lingbot-video-model>"
|
| 108 |
+
export REWRITER_BASE_MODEL="<path_to_rewriter_base_vlm>"
|
| 109 |
+
export REWRITER_ADAPTER="<path_to_rewriter_lora>"
|
| 110 |
+
|
| 111 |
+
python rewriter/inference.py --backend transformers --mode t2v \
|
| 112 |
+
--prompt "<plain_user_prompt>" --duration 5 --output prompt.json
|
| 113 |
+
|
| 114 |
+
# Recommended Auto Negative block. If skipped, remove --negative_prompt_json from
|
| 115 |
+
# the DiT inference command.
|
| 116 |
+
python rewriter/auto_negative.py --backend transformers --mode t2v \
|
| 117 |
+
--caption prompt.json --output negative.json
|
| 118 |
+
|
| 119 |
+
export BACKEND=diffusers # or: sglang
|
| 120 |
+
|
| 121 |
+
python scripts/inference.py \
|
| 122 |
+
--backend "$BACKEND" \
|
| 123 |
+
--model_dir "$MODEL_DIR" \
|
| 124 |
+
--run_refiner \
|
| 125 |
+
--mode t2v \
|
| 126 |
+
--prompt_json prompt.json \
|
| 127 |
+
--negative_prompt_json negative.json \
|
| 128 |
+
--output "<output_dir>/base.mp4" \
|
| 129 |
+
--refiner_output "<output_dir>/refined.mp4" \
|
| 130 |
+
--height 480 \
|
| 131 |
+
--width 832 \
|
| 132 |
+
--fps 24 \
|
| 133 |
+
--steps 40 \
|
| 134 |
+
--refiner_steps 8 \
|
| 135 |
+
--guidance_scale 3 \
|
| 136 |
+
--refiner_guidance_scale 3 \
|
| 137 |
+
--shift 3 \
|
| 138 |
+
--refiner_shift 3 \
|
| 139 |
+
--transformer_dtype bf16 \
|
| 140 |
+
--text_encoder_dtype bf16 \
|
| 141 |
+
--vae_dtype fp32 \
|
| 142 |
+
--refiner_vae_dtype fp32 \
|
| 143 |
+
--reuse_condition_features
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
Ready-to-run scripts are provided for single-GPU and multi-GPU inference. Set
|
| 147 |
+
your environment and model path first:
|
| 148 |
+
|
| 149 |
+
```bash
|
| 150 |
+
source .venv/bin/activate
|
| 151 |
+
export PYTHON_BIN=python
|
| 152 |
+
export DENSE_MODEL_DIR="<path_to_lingbot-video-dense>"
|
| 153 |
+
export MOE_MODEL_DIR="<path_to_lingbot-video-moe>"
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
Single-GPU scripts use direct diffusers and batched CFG by default. They run
|
| 157 |
+
base generation only.
|
| 158 |
+
|
| 159 |
+
```bash
|
| 160 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/single-gpu/run_dense_t2i.sh
|
| 161 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/single-gpu/run_dense_t2v.sh
|
| 162 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/single-gpu/run_dense_ti2v.sh
|
| 163 |
+
|
| 164 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/single-gpu/run_moe_t2i.sh
|
| 165 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/single-gpu/run_moe_t2v.sh
|
| 166 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/single-gpu/run_moe_ti2v.sh
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
Multi-GPU no-refiner scripts use the same inference arguments as the single-GPU
|
| 170 |
+
scripts, plus CP8 and FSDP:
|
| 171 |
+
|
| 172 |
+
```bash
|
| 173 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_dense_t2i_fsdp_cp8.sh
|
| 174 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_dense_t2v_fsdp_cp8.sh
|
| 175 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_dense_ti2v_fsdp_cp8.sh
|
| 176 |
+
|
| 177 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_moe_t2i_fsdp_cp8.sh
|
| 178 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_moe_t2v_fsdp_cp8.sh
|
| 179 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus-no-refiner/run_moe_ti2v_fsdp_cp8.sh
|
| 180 |
+
```
|
| 181 |
+
|
| 182 |
+
Multi-GPU refiner scripts use CP8 + FSDP + batched CFG by default. They also
|
| 183 |
+
default to direct diffusers; set `BACKEND=sglang` externally when you want to
|
| 184 |
+
exercise SGLang Diffusion. MoE multi-GPU T2V/TI2V scripts additionally run the
|
| 185 |
+
refiner.
|
| 186 |
+
|
| 187 |
+
```bash
|
| 188 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus/run_dense_t2i_fsdp_cp8.sh
|
| 189 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus/run_dense_t2v_fsdp_cp8.sh
|
| 190 |
+
MODEL_DIR="$DENSE_MODEL_DIR" ./scripts/multi-gpus/run_dense_ti2v_fsdp_cp8.sh
|
| 191 |
+
|
| 192 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus/run_moe_t2i_fsdp_cp8.sh
|
| 193 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus/run_moe_t2v_refiner_fsdp_cp8.sh
|
| 194 |
+
MODEL_DIR="$MOE_MODEL_DIR" ./scripts/multi-gpus/run_moe_ti2v_refiner_fsdp_cp8.sh
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
All scripts accept the same environment overrides, such as `PROMPT_JSON`,
|
| 198 |
+
`IMAGE`, `OUT_DIR`, `HEIGHT`, `WIDTH`, `STEPS`, `GUIDANCE_SCALE`, `SHIFT`,
|
| 199 |
+
`SEED`, `FPS`, `BACKEND`, and `PYTHON_BIN`. Refiner scripts also accept
|
| 200 |
+
`REFINER_HEIGHT`, `REFINER_WIDTH`, `REFINER_STEPS`,
|
| 201 |
+
`REFINER_GUIDANCE_SCALE`, `REFINER_SHIFT`, `REFINER_T_THRESH`, and
|
| 202 |
+
`REFINER_SIGMA_TAIL_STEPS`. MoE scripts default to grouped expert execution
|
| 203 |
+
(`LINGBOT_MOE_EXPERT_BACKEND=grouped_mm`).
|
| 204 |
+
|
| 205 |
+
See English Docs or 中文文档 for the
|
| 206 |
+
detailed prompt rewrite, auto-negative, TI2V, base-only/refiner, distributed
|
| 207 |
+
SGLang, and speed-first FP8 workflows.
|
| 208 |
+
|
| 209 |
+
## 📊 Benchmarks
|
| 210 |
+
|
| 211 |
+
### 🏛️ Public Benchmark
|
| 212 |
+
|
| 213 |
+
As of July 9th, 2026, LingBot-Video ranks top in [RBench Leaderboard](https://huggingface.co/spaces/DAGroup-PKU/RBench-Leaderboard).
|
| 214 |
+
|
| 215 |
+
| Models | Open-source | Avg. | Manip. | Spatial | Multi-entity | Long-hor. | Reasoning | Single arm | Dual arm | Quadruped | Humanoid |
|
| 216 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 217 |
+
| **LingBot-Video (Ours)** | ✅ | **0.620** | **0.578** | <u>0.643</u> | 0.444 | **0.634** | <u>0.505</u> | 0.636 | 0.639 | **0.758** | 0.689 |
|
| 218 |
+
| Cosmos3 Super | ✅ | 0.581 | 0.487 | 0.642 | 0.444 | <u>0.591</u> | 0.395 | 0.615 | 0.623 | <u>0.739</u> | <u>0.691</u> |
|
| 219 |
+
| LongCat-Video | ✅ | 0.437 | 0.372 | 0.310 | 0.220 | 0.384 | 0.186 | 0.586 | 0.576 | 0.681 | 0.621 |
|
| 220 |
+
| Wan 2.2 A14B | ✅ | 0.507 | 0.381 | 0.454 | 0.373 | 0.501 | 0.330 | 0.608 | 0.582 | 0.690 | 0.648 |
|
| 221 |
+
| HunyuanVideo 1.5 | ✅ | 0.460 | 0.442 | 0.316 | 0.312 | 0.438 | 0.364 | 0.513 | 0.526 | 0.634 | 0.595 |
|
| 222 |
+
| Wan 2.6 | ❌ | <u>0.607</u> | 0.546 | **0.656** | <u>0.479</u> | 0.514 | **0.531** | **0.666** | **0.681** | 0.723 | 0.667 |
|
| 223 |
+
| Seedance 1.5 pro | ❌ | 0.584 | <u>0.577</u> | 0.495 | **0.484** | 0.570 | 0.470 | <u>0.648</u> | <u>0.641</u> | 0.680 | **0.692** |
|
| 224 |
+
| Veo 3 | ❌ | 0.563 | 0.521 | 0.508 | 0.430 | 0.530 | 0.504 | 0.634 | 0.610 | 0.689 | 0.637 |
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
*Note: **Bold** indicates the best performance, and <u>underline</u> indicates the second best.*
|
| 228 |
+
|
| 229 |
+
## ⚖️ License
|
| 230 |
+
This project is licensed under the Apache 2.0 License. Please refer to the [LICENSE file](LICENSE) for the full text, including details on rights and restrictions.
|
| 231 |
+
|
| 232 |
+
## 📚 Citation
|
| 233 |
+
If you find this work useful for your research, please cite our paper:
|
| 234 |
+
|
| 235 |
+
```bibtex
|
| 236 |
+
@article{lingbot-video,
|
| 237 |
+
title = {Scaling Mixture-of-Experts Video Pretraining for Embodied Intelligence},
|
| 238 |
+
author = {Shuailei Ma and Jiaqi Liao and Xinyang Wang and Jingjing Wang and Chaoran Feng and Zijing Hu and Chong Bao and Zichen Xi and Yuqi Gan and Weisen Wang and Yanhong Zeng and Qin Zhao and Zifan Shi and Wei Wu and Hao Ouyang and Qiuyu Wang and Shangzhan Zhang and Jiahao Shao and Yipengjing Sun and Liangxiao Hu and Lunke Pan and Nan Xue and Kecheng Zheng and Yinghao Xu and Xing Zhu and Yujun Shen and Ka Leong Cheng},
|
| 239 |
+
journal={arXiv preprint arXiv:2607.xxxxx},
|
| 240 |
+
year = {2026}
|
| 241 |
+
}
|
| 242 |
+
```
|
RUNTIME_ADAPTER.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LingBot SDNQ runtime adapter
|
| 2 |
+
|
| 3 |
+
`lingbot_sdnq_runtime` is part of this model repository. It loads ordinary
|
| 4 |
+
SDNQ-packed Linear weights and also reconstructs LingBot's 3-D MoE `w1`, `w2`,
|
| 5 |
+
and `w3` tensors from packed UINT4 storage.
|
| 6 |
+
|
| 7 |
+
On the official RunPod Torch 2.8 / CUDA 12.8 image, `torch._grouped_mm` only
|
| 8 |
+
accepts compute capability 9.0 and the upstream `sglang-kernel` wheel targets a
|
| 9 |
+
newer Torch ABI. The adapter therefore supplies Torch implementations of only
|
| 10 |
+
SGLang's token-alignment and top-k sum-reduction helpers. Expert GEMMs and
|
| 11 |
+
activation stay on the pinned SGLang Triton fused-MoE implementation.
|
| 12 |
+
|
| 13 |
+
For MoE inference install the upstream-pinned runtime without dependency
|
| 14 |
+
resolution so it does not replace the tested Torch build:
|
| 15 |
+
|
| 16 |
+
```bash
|
| 17 |
+
pip install --no-deps sglang==0.5.13.post1 apache-tvm-ffi==0.1.9 tilelang==0.1.8 triton==3.6.0
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
The adapter intentionally does not cache dequantized bf16 expert weights;
|
| 21 |
+
reported residency therefore remains the SDNQ packed representation.
|
model_index.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "LingBotVideoPipeline",
|
| 3 |
+
"_diffusers_version": "0.37.1",
|
| 4 |
+
"transformer": [
|
| 5 |
+
"lingbot_video.transformer_lingbot_video",
|
| 6 |
+
"LingBotVideoTransformer3DModel"
|
| 7 |
+
],
|
| 8 |
+
"vae": [
|
| 9 |
+
"diffusers",
|
| 10 |
+
"AutoencoderKLWan"
|
| 11 |
+
],
|
| 12 |
+
"text_encoder": [
|
| 13 |
+
"transformers",
|
| 14 |
+
"Qwen3VLForConditionalGeneration"
|
| 15 |
+
],
|
| 16 |
+
"processor": [
|
| 17 |
+
"transformers",
|
| 18 |
+
"Qwen3VLProcessor"
|
| 19 |
+
],
|
| 20 |
+
"scheduler": [
|
| 21 |
+
"lingbot_video.scheduling_flow_unipc",
|
| 22 |
+
"FlowUniPCMultistepScheduler"
|
| 23 |
+
]
|
| 24 |
+
}
|
model_index.json.bak_lingbot_video_diffusers
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "LingBotVideoPipeline",
|
| 3 |
+
"_diffusers_version": "0.37.1",
|
| 4 |
+
"transformer": [
|
| 5 |
+
"lingbot_video_diffusers.transformer_lingbot_video",
|
| 6 |
+
"LingBotVideoTransformer3DModel"
|
| 7 |
+
],
|
| 8 |
+
"vae": [
|
| 9 |
+
"diffusers",
|
| 10 |
+
"AutoencoderKLWan"
|
| 11 |
+
],
|
| 12 |
+
"text_encoder": [
|
| 13 |
+
"transformers",
|
| 14 |
+
"Qwen3VLForConditionalGeneration"
|
| 15 |
+
],
|
| 16 |
+
"processor": [
|
| 17 |
+
"transformers",
|
| 18 |
+
"Qwen3VLProcessor"
|
| 19 |
+
],
|
| 20 |
+
"scheduler": [
|
| 21 |
+
"lingbot_video_diffusers.scheduling_flow_unipc",
|
| 22 |
+
"FlowUniPCMultistepScheduler"
|
| 23 |
+
]
|
| 24 |
+
}
|
processor/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-text-to-text
|
| 4 |
+
---
|
| 5 |
+
<a href="https://chat.qwenlm.ai/" target="_blank" style="margin: 2px;">
|
| 6 |
+
<img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
|
| 7 |
+
</a>
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
# Qwen3-VL-4B-Instruct
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
Meet Qwen3-VL — the most powerful vision-language model in the Qwen series to date.
|
| 14 |
+
|
| 15 |
+
This generation delivers comprehensive upgrades across the board: superior text understanding & generation, deeper visual perception & reasoning, extended context length, enhanced spatial and video dynamics comprehension, and stronger agent interaction capabilities.
|
| 16 |
+
|
| 17 |
+
Available in Dense and MoE architectures that scale from edge to cloud, with Instruct and reasoning‑enhanced Thinking editions for flexible, on‑demand deployment.
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#### Key Enhancements:
|
| 21 |
+
|
| 22 |
+
* **Visual Agent**: Operates PC/mobile GUIs—recognizes elements, understands functions, invokes tools, completes tasks.
|
| 23 |
+
|
| 24 |
+
* **Visual Coding Boost**: Generates Draw.io/HTML/CSS/JS from images/videos.
|
| 25 |
+
|
| 26 |
+
* **Advanced Spatial Perception**: Judges object positions, viewpoints, and occlusions; provides stronger 2D grounding and enables 3D grounding for spatial reasoning and embodied AI.
|
| 27 |
+
|
| 28 |
+
* **Long Context & Video Understanding**: Native 256K context, expandable to 1M; handles books and hours-long video with full recall and second-level indexing.
|
| 29 |
+
|
| 30 |
+
* **Enhanced Multimodal Reasoning**: Excels in STEM/Math—causal analysis and logical, evidence-based answers.
|
| 31 |
+
|
| 32 |
+
* **Upgraded Visual Recognition**: Broader, higher-quality pretraining is able to “recognize everything”—celebrities, anime, products, landmarks, flora/fauna, etc.
|
| 33 |
+
|
| 34 |
+
* **Expanded OCR**: Supports 32 languages (up from 19); robust in low light, blur, and tilt; better with rare/ancient characters and jargon; improved long-document structure parsing.
|
| 35 |
+
|
| 36 |
+
* **Text Understanding on par with pure LLMs**: Seamless text–vision fusion for lossless, unified comprehension.
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
#### Model Architecture Updates:
|
| 40 |
+
|
| 41 |
+
<p align="center">
|
| 42 |
+
<img src="https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3-VL/qwen3vl_arc.jpg" width="80%"/>
|
| 43 |
+
<p>
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
1. **Interleaved-MRoPE**: Full‑frequency allocation over time, width, and height via robust positional embeddings, enhancing long‑horizon video reasoning.
|
| 47 |
+
|
| 48 |
+
2. **DeepStack**: Fuses multi‑level ViT features to capture fine‑grained details and sharpen image–text alignment.
|
| 49 |
+
|
| 50 |
+
3. **Text–Timestamp Alignment:** Moves beyond T‑RoPE to precise, timestamp‑grounded event localization for stronger video temporal modeling.
|
| 51 |
+
|
| 52 |
+
This is the weight repository for Qwen3-VL-4B-Instruct.
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## Model Performance
|
| 58 |
+
|
| 59 |
+
**Multimodal performance**
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
**Pure text performance**
|
| 64 |
+

|
| 65 |
+
|
| 66 |
+
## Quickstart
|
| 67 |
+
|
| 68 |
+
Below, we provide simple examples to show how to use Qwen3-VL with 🤖 ModelScope and 🤗 Transformers.
|
| 69 |
+
|
| 70 |
+
The code of Qwen3-VL has been in the latest Hugging Face transformers and we advise you to build from source with command:
|
| 71 |
+
```
|
| 72 |
+
pip install git+https://github.com/huggingface/transformers
|
| 73 |
+
# pip install transformers==4.57.0 # currently, V4.57.0 is not released
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
### Using 🤗 Transformers to Chat
|
| 77 |
+
|
| 78 |
+
Here we show a code snippet to show how to use the chat model with `transformers`:
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
|
| 82 |
+
|
| 83 |
+
# default: Load the model on the available device(s)
|
| 84 |
+
model = Qwen3VLForConditionalGeneration.from_pretrained(
|
| 85 |
+
"Qwen/Qwen3-VL-4B-Instruct", dtype="auto", device_map="auto"
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
# We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
|
| 89 |
+
# model = Qwen3VLForConditionalGeneration.from_pretrained(
|
| 90 |
+
# "Qwen/Qwen3-VL-4B-Instruct",
|
| 91 |
+
# dtype=torch.bfloat16,
|
| 92 |
+
# attn_implementation="flash_attention_2",
|
| 93 |
+
# device_map="auto",
|
| 94 |
+
# )
|
| 95 |
+
|
| 96 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen/Qwen3-VL-4B-Instruct")
|
| 97 |
+
|
| 98 |
+
messages = [
|
| 99 |
+
{
|
| 100 |
+
"role": "user",
|
| 101 |
+
"content": [
|
| 102 |
+
{
|
| 103 |
+
"type": "image",
|
| 104 |
+
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
|
| 105 |
+
},
|
| 106 |
+
{"type": "text", "text": "Describe this image."},
|
| 107 |
+
],
|
| 108 |
+
}
|
| 109 |
+
]
|
| 110 |
+
|
| 111 |
+
# Preparation for inference
|
| 112 |
+
inputs = processor.apply_chat_template(
|
| 113 |
+
messages,
|
| 114 |
+
tokenize=True,
|
| 115 |
+
add_generation_prompt=True,
|
| 116 |
+
return_dict=True,
|
| 117 |
+
return_tensors="pt"
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
# Inference: Generation of the output
|
| 121 |
+
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
| 122 |
+
generated_ids_trimmed = [
|
| 123 |
+
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
|
| 124 |
+
]
|
| 125 |
+
output_text = processor.batch_decode(
|
| 126 |
+
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 127 |
+
)
|
| 128 |
+
print(output_text)
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
### Generation Hyperparameters
|
| 132 |
+
#### VL
|
| 133 |
+
```bash
|
| 134 |
+
export greedy='false'
|
| 135 |
+
export top_p=0.8
|
| 136 |
+
export top_k=20
|
| 137 |
+
export temperature=0.7
|
| 138 |
+
export repetition_penalty=1.0
|
| 139 |
+
export presence_penalty=1.5
|
| 140 |
+
export out_seq_length=16384
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
#### Text
|
| 144 |
+
```bash
|
| 145 |
+
export greedy='false'
|
| 146 |
+
export top_p=1.0
|
| 147 |
+
export top_k=40
|
| 148 |
+
export repetition_penalty=1.0
|
| 149 |
+
export presence_penalty=2.0
|
| 150 |
+
export temperature=1.0
|
| 151 |
+
export out_seq_length=32768
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
## Citation
|
| 156 |
+
|
| 157 |
+
If you find our work helpful, feel free to give us a cite.
|
| 158 |
+
|
| 159 |
+
```
|
| 160 |
+
@misc{qwen3technicalreport,
|
| 161 |
+
title={Qwen3 Technical Report},
|
| 162 |
+
author={Qwen Team},
|
| 163 |
+
year={2025},
|
| 164 |
+
eprint={2505.09388},
|
| 165 |
+
archivePrefix={arXiv},
|
| 166 |
+
primaryClass={cs.CL},
|
| 167 |
+
url={https://arxiv.org/abs/2505.09388},
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
@article{Qwen2.5-VL,
|
| 171 |
+
title={Qwen2.5-VL Technical Report},
|
| 172 |
+
author={Bai, Shuai and Chen, Keqin and Liu, Xuejing and Wang, Jialin and Ge, Wenbin and Song, Sibo and Dang, Kai and Wang, Peng and Wang, Shijie and Tang, Jun and Zhong, Humen and Zhu, Yuanzhi and Yang, Mingkun and Li, Zhaohai and Wan, Jianqiang and Wang, Pengfei and Ding, Wei and Fu, Zheren and Xu, Yiheng and Ye, Jiabo and Zhang, Xi and Xie, Tianbao and Cheng, Zesen and Zhang, Hang and Yang, Zhibo and Xu, Haiyang and Lin, Junyang},
|
| 173 |
+
journal={arXiv preprint arXiv:2502.13923},
|
| 174 |
+
year={2025}
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
@article{Qwen2VL,
|
| 178 |
+
title={Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution},
|
| 179 |
+
author={Wang, Peng and Bai, Shuai and Tan, Sinan and Wang, Shijie and Fan, Zhihao and Bai, Jinze and Chen, Keqin and Liu, Xuejing and Wang, Jialin and Ge, Wenbin and Fan, Yang and Dang, Kai and Du, Mengfei and Ren, Xuancheng and Men, Rui and Liu, Dayiheng and Zhou, Chang and Zhou, Jingren and Lin, Junyang},
|
| 180 |
+
journal={arXiv preprint arXiv:2409.12191},
|
| 181 |
+
year={2024}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
@article{Qwen-VL,
|
| 185 |
+
title={Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyond},
|
| 186 |
+
author={Bai, Jinze and Bai, Shuai and Yang, Shusheng and Wang, Shijie and Tan, Sinan and Wang, Peng and Lin, Junyang and Zhou, Chang and Zhou, Jingren},
|
| 187 |
+
journal={arXiv preprint arXiv:2308.12966},
|
| 188 |
+
year={2023}
|
| 189 |
+
}
|
| 190 |
+
```
|
processor/chat_template.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- for message in messages %}\n {%- if message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content_item in message.content %}\n {%- if 'text' in content_item %}\n {{- content_item.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and message.content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n"
|
| 3 |
+
}
|
| 4 |
+
|
processor/config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"image_token_id": 151655,
|
| 6 |
+
"model_type": "qwen3_vl",
|
| 7 |
+
"text_config": {
|
| 8 |
+
"attention_bias": false,
|
| 9 |
+
"attention_dropout": 0.0,
|
| 10 |
+
"bos_token_id": 151643,
|
| 11 |
+
"dtype": "bfloat16",
|
| 12 |
+
"eos_token_id": 151645,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "silu",
|
| 15 |
+
"hidden_size": 2560,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 9728,
|
| 18 |
+
"max_position_embeddings": 262144,
|
| 19 |
+
"model_type": "qwen3_vl_text",
|
| 20 |
+
"num_attention_heads": 32,
|
| 21 |
+
"num_hidden_layers": 36,
|
| 22 |
+
"num_key_value_heads": 8,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_scaling": {
|
| 25 |
+
"mrope_interleaved": true,
|
| 26 |
+
"mrope_section": [
|
| 27 |
+
24,
|
| 28 |
+
20,
|
| 29 |
+
20
|
| 30 |
+
],
|
| 31 |
+
"rope_type": "default"
|
| 32 |
+
},
|
| 33 |
+
"rope_theta": 5000000,
|
| 34 |
+
"tie_word_embeddings": true,
|
| 35 |
+
"use_cache": true,
|
| 36 |
+
"vocab_size": 151936
|
| 37 |
+
},
|
| 38 |
+
"tie_word_embeddings": true,
|
| 39 |
+
"transformers_version": "4.57.0.dev0",
|
| 40 |
+
"video_token_id": 151656,
|
| 41 |
+
"vision_config": {
|
| 42 |
+
"deepstack_visual_indexes": [
|
| 43 |
+
5,
|
| 44 |
+
11,
|
| 45 |
+
17
|
| 46 |
+
],
|
| 47 |
+
"depth": 24,
|
| 48 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 49 |
+
"hidden_size": 1024,
|
| 50 |
+
"in_channels": 3,
|
| 51 |
+
"initializer_range": 0.02,
|
| 52 |
+
"intermediate_size": 4096,
|
| 53 |
+
"model_type": "qwen3_vl",
|
| 54 |
+
"num_heads": 16,
|
| 55 |
+
"num_position_embeddings": 2304,
|
| 56 |
+
"out_hidden_size": 2560,
|
| 57 |
+
"patch_size": 16,
|
| 58 |
+
"spatial_merge_size": 2,
|
| 59 |
+
"temporal_patch_size": 2
|
| 60 |
+
},
|
| 61 |
+
"vision_end_token_id": 151653,
|
| 62 |
+
"vision_start_token_id": 151652
|
| 63 |
+
}
|
processor/configuration.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
processor/generation_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"pad_token_id": 151643,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151645,
|
| 7 |
+
151643
|
| 8 |
+
],
|
| 9 |
+
"top_k": 20,
|
| 10 |
+
"top_p": 0.8,
|
| 11 |
+
"repetition_penalty": 1.0,
|
| 12 |
+
"temperature": 0.7,
|
| 13 |
+
"transformers_version": "4.56.0"
|
| 14 |
+
}
|
processor/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processor/preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 16777216,
|
| 4 |
+
"shortest_edge": 65536
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"image_processor_type": "Qwen2VLImageProcessorFast"
|
| 21 |
+
}
|
processor/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processor/tokenizer_config.json
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_prefix_space": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"151643": {
|
| 6 |
+
"content": "<|endoftext|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
},
|
| 181 |
+
"151665": {
|
| 182 |
+
"content": "<tool_response>",
|
| 183 |
+
"lstrip": false,
|
| 184 |
+
"normalized": false,
|
| 185 |
+
"rstrip": false,
|
| 186 |
+
"single_word": false,
|
| 187 |
+
"special": false
|
| 188 |
+
},
|
| 189 |
+
"151666": {
|
| 190 |
+
"content": "</tool_response>",
|
| 191 |
+
"lstrip": false,
|
| 192 |
+
"normalized": false,
|
| 193 |
+
"rstrip": false,
|
| 194 |
+
"single_word": false,
|
| 195 |
+
"special": false
|
| 196 |
+
},
|
| 197 |
+
"151667": {
|
| 198 |
+
"content": "<think>",
|
| 199 |
+
"lstrip": false,
|
| 200 |
+
"normalized": false,
|
| 201 |
+
"rstrip": false,
|
| 202 |
+
"single_word": false,
|
| 203 |
+
"special": false
|
| 204 |
+
},
|
| 205 |
+
"151668": {
|
| 206 |
+
"content": "</think>",
|
| 207 |
+
"lstrip": false,
|
| 208 |
+
"normalized": false,
|
| 209 |
+
"rstrip": false,
|
| 210 |
+
"single_word": false,
|
| 211 |
+
"special": false
|
| 212 |
+
}
|
| 213 |
+
},
|
| 214 |
+
"additional_special_tokens": [
|
| 215 |
+
"<|im_start|>",
|
| 216 |
+
"<|im_end|>",
|
| 217 |
+
"<|object_ref_start|>",
|
| 218 |
+
"<|object_ref_end|>",
|
| 219 |
+
"<|box_start|>",
|
| 220 |
+
"<|box_end|>",
|
| 221 |
+
"<|quad_start|>",
|
| 222 |
+
"<|quad_end|>",
|
| 223 |
+
"<|vision_start|>",
|
| 224 |
+
"<|vision_end|>",
|
| 225 |
+
"<|vision_pad|>",
|
| 226 |
+
"<|image_pad|>",
|
| 227 |
+
"<|video_pad|>"
|
| 228 |
+
],
|
| 229 |
+
"bos_token": null,
|
| 230 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- for message in messages %}\n {%- if message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content_item in message.content %}\n {%- if 'text' in content_item %}\n {{- content_item.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and message.content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 231 |
+
"clean_up_tokenization_spaces": false,
|
| 232 |
+
"eos_token": "<|im_end|>",
|
| 233 |
+
"errors": "replace",
|
| 234 |
+
"model_max_length": 262144,
|
| 235 |
+
"pad_token": "<|endoftext|>",
|
| 236 |
+
"split_special_tokens": false,
|
| 237 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 238 |
+
"unk_token": null
|
| 239 |
+
}
|
processor/video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 25165824,
|
| 4 |
+
"shortest_edge": 4096
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 21 |
+
}
|
processor/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runtime-requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
accelerate==1.14.0
|
| 2 |
+
diffusers==0.39.0
|
| 3 |
+
huggingface_hub==1.23.0
|
| 4 |
+
safetensors==0.8.0
|
| 5 |
+
transformers==5.8.1
|
| 6 |
+
git+https://github.com/Robbyant/lingbot-video.git@a2bb04b78edd848500dc27a26e035a95442ae186
|
| 7 |
+
git+https://github.com/Disty0/sdnq.git@d841c383ff7be38728d4df829e17af4f15d4fd66
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FlowUniPCMultistepScheduler",
|
| 3 |
+
"num_train_timesteps": 1000,
|
| 4 |
+
"shift": 1,
|
| 5 |
+
"use_dynamic_shifting": false
|
| 6 |
+
}
|
scheduling_flow_unipc.py
ADDED
|
@@ -0,0 +1,818 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2025 Ant Group Co., Ltd. All Rights Reserved.
|
| 2 |
+
# Project: Lumos Video Generation Foundation Model
|
| 3 |
+
#
|
| 4 |
+
# Portions of this file are originally from third parties (see below) and are
|
| 5 |
+
# used under their respective open-source licenses. Modifications and
|
| 6 |
+
# integration into the Lumos project are made by Ant Group Co., Ltd.
|
| 7 |
+
#
|
| 8 |
+
# Copied from https://github.com/huggingface/diffusers/blob/v0.31.0/src/diffusers/schedulers/scheduling_unipc_multistep.py
|
| 9 |
+
# Convert unipc for flow matching
|
| 10 |
+
# Copyright 2024-2025 The Alibaba Wan Team Authors. All rights reserved.
|
| 11 |
+
#
|
| 12 |
+
# VENDORED from `lumos/utils/fm_solvers_unipc.py` (bitwise-identical copy, no
|
| 13 |
+
# edits to numerical behavior). Reason: the native diffusers
|
| 14 |
+
# `UniPCMultistepScheduler(prediction_type="flow_prediction",
|
| 15 |
+
# use_flow_sigmas=True, flow_shift=...)` is NOT numerically equivalent to this
|
| 16 |
+
# scheduler — they build different base-sigma grids (this one uses
|
| 17 |
+
# `sigma = 1 - linspace(1, 1/N, N)` → sigma in [0, 1-1/N]; native uses
|
| 18 |
+
# `linspace(1, 1/N, N)` → sigma in [1/N, 1]), which offsets every timestep by
|
| 19 |
+
# one position and shifts sigmas by ~2e-3. See
|
| 20 |
+
# `tests/test_scheduler_equivalence.py` for the documented evidence. The L2
|
| 21 |
+
# parity test pins this vendored copy bitwise-identical to the lumos original.
|
| 22 |
+
|
| 23 |
+
import math
|
| 24 |
+
from typing import List, Optional, Tuple, Union
|
| 25 |
+
|
| 26 |
+
import numpy as np
|
| 27 |
+
import torch
|
| 28 |
+
from diffusers.configuration_utils import ConfigMixin, register_to_config
|
| 29 |
+
from diffusers.schedulers.scheduling_utils import (KarrasDiffusionSchedulers,
|
| 30 |
+
SchedulerMixin,
|
| 31 |
+
SchedulerOutput)
|
| 32 |
+
from diffusers.utils import deprecate, is_scipy_available
|
| 33 |
+
|
| 34 |
+
if is_scipy_available():
|
| 35 |
+
import scipy.stats
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
class FlowUniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
|
| 39 |
+
"""
|
| 40 |
+
`UniPCMultistepScheduler` is a training-free framework designed for the fast sampling of diffusion models.
|
| 41 |
+
|
| 42 |
+
This model inherits from [`SchedulerMixin`] and [`ConfigMixin`]. Check the superclass documentation for the generic
|
| 43 |
+
methods the library implements for all schedulers such as loading and saving.
|
| 44 |
+
|
| 45 |
+
Args:
|
| 46 |
+
num_train_timesteps (`int`, defaults to 1000):
|
| 47 |
+
The number of diffusion steps to train the model.
|
| 48 |
+
solver_order (`int`, default `2`):
|
| 49 |
+
The UniPC order which can be any positive integer. The effective order of accuracy is `solver_order + 1`
|
| 50 |
+
due to the UniC. It is recommended to use `solver_order=2` for guided sampling, and `solver_order=3` for
|
| 51 |
+
unconditional sampling.
|
| 52 |
+
prediction_type (`str`, defaults to "flow_prediction"):
|
| 53 |
+
Prediction type of the scheduler function; must be `flow_prediction` for this scheduler, which predicts
|
| 54 |
+
the flow of the diffusion process.
|
| 55 |
+
thresholding (`bool`, defaults to `False`):
|
| 56 |
+
Whether to use the "dynamic thresholding" method. This is unsuitable for latent-space diffusion models such
|
| 57 |
+
as Stable Diffusion.
|
| 58 |
+
dynamic_thresholding_ratio (`float`, defaults to 0.995):
|
| 59 |
+
The ratio for the dynamic thresholding method. Valid only when `thresholding=True`.
|
| 60 |
+
sample_max_value (`float`, defaults to 1.0):
|
| 61 |
+
The threshold value for dynamic thresholding. Valid only when `thresholding=True` and `predict_x0=True`.
|
| 62 |
+
predict_x0 (`bool`, defaults to `True`):
|
| 63 |
+
Whether to use the updating algorithm on the predicted x0.
|
| 64 |
+
solver_type (`str`, default `bh2`):
|
| 65 |
+
Solver type for UniPC. It is recommended to use `bh1` for unconditional sampling when steps < 10, and `bh2`
|
| 66 |
+
otherwise.
|
| 67 |
+
lower_order_final (`bool`, default `True`):
|
| 68 |
+
Whether to use lower-order solvers in the final steps. Only valid for < 15 inference steps. This can
|
| 69 |
+
stabilize the sampling of DPMSolver for steps < 15, especially for steps <= 10.
|
| 70 |
+
disable_corrector (`list`, default `[]`):
|
| 71 |
+
Decides which step to disable the corrector to mitigate the misalignment between `epsilon_theta(x_t, c)`
|
| 72 |
+
and `epsilon_theta(x_t^c, c)` which can influence convergence for a large guidance scale. Corrector is
|
| 73 |
+
usually disabled during the first few steps.
|
| 74 |
+
solver_p (`SchedulerMixin`, default `None`):
|
| 75 |
+
Any other scheduler that if specified, the algorithm becomes `solver_p + UniC`.
|
| 76 |
+
use_karras_sigmas (`bool`, *optional*, defaults to `False`):
|
| 77 |
+
Whether to use Karras sigmas for step sizes in the noise schedule during the sampling process. If `True`,
|
| 78 |
+
the sigmas are determined according to a sequence of noise levels {σi}.
|
| 79 |
+
use_exponential_sigmas (`bool`, *optional*, defaults to `False`):
|
| 80 |
+
Whether to use exponential sigmas for step sizes in the noise schedule during the sampling process.
|
| 81 |
+
timestep_spacing (`str`, defaults to `"linspace"`):
|
| 82 |
+
The way the timesteps should be scaled. Refer to Table 2 of the [Common Diffusion Noise Schedules and
|
| 83 |
+
Sample Steps are Flawed](https://huggingface.co/papers/2305.08891) for more information.
|
| 84 |
+
steps_offset (`int`, defaults to 0):
|
| 85 |
+
An offset added to the inference steps, as required by some model families.
|
| 86 |
+
final_sigmas_type (`str`, defaults to `"zero"`):
|
| 87 |
+
The final `sigma` value for the noise schedule during the sampling process. If `"sigma_min"`, the final
|
| 88 |
+
sigma is the same as the last sigma in the training schedule. If `zero`, the final sigma is set to 0.
|
| 89 |
+
"""
|
| 90 |
+
|
| 91 |
+
_compatibles = [e.name for e in KarrasDiffusionSchedulers]
|
| 92 |
+
order = 1
|
| 93 |
+
|
| 94 |
+
@register_to_config
|
| 95 |
+
def __init__(
|
| 96 |
+
self,
|
| 97 |
+
num_train_timesteps: int = 1000,
|
| 98 |
+
solver_order: int = 2,
|
| 99 |
+
prediction_type: str = "flow_prediction",
|
| 100 |
+
shift: Optional[float] = 1.0,
|
| 101 |
+
use_dynamic_shifting=False,
|
| 102 |
+
thresholding: bool = False,
|
| 103 |
+
dynamic_thresholding_ratio: float = 0.995,
|
| 104 |
+
sample_max_value: float = 1.0,
|
| 105 |
+
predict_x0: bool = True,
|
| 106 |
+
solver_type: str = "bh2",
|
| 107 |
+
lower_order_final: bool = True,
|
| 108 |
+
disable_corrector: List[int] = [],
|
| 109 |
+
solver_p: SchedulerMixin = None,
|
| 110 |
+
timestep_spacing: str = "linspace",
|
| 111 |
+
steps_offset: int = 0,
|
| 112 |
+
final_sigmas_type: Optional[str] = "zero", # "zero", "sigma_min"
|
| 113 |
+
):
|
| 114 |
+
|
| 115 |
+
if solver_type not in ["bh1", "bh2"]:
|
| 116 |
+
if solver_type in ["midpoint", "heun", "logrho"]:
|
| 117 |
+
self.register_to_config(solver_type="bh2")
|
| 118 |
+
else:
|
| 119 |
+
raise NotImplementedError(
|
| 120 |
+
f"{solver_type} is not implemented for {self.__class__}")
|
| 121 |
+
|
| 122 |
+
self.predict_x0 = predict_x0
|
| 123 |
+
# setable values
|
| 124 |
+
self.num_inference_steps = None
|
| 125 |
+
alphas = np.linspace(1, 1 / num_train_timesteps,
|
| 126 |
+
num_train_timesteps)[::-1].copy()
|
| 127 |
+
sigmas = 1.0 - alphas
|
| 128 |
+
sigmas = torch.from_numpy(sigmas).to(dtype=torch.float32)
|
| 129 |
+
|
| 130 |
+
if not use_dynamic_shifting:
|
| 131 |
+
# when use_dynamic_shifting is True, we apply the timestep shifting on the fly based on the image resolution
|
| 132 |
+
sigmas = shift * sigmas / (1 +
|
| 133 |
+
(shift - 1) * sigmas) # pyright: ignore
|
| 134 |
+
|
| 135 |
+
self.sigmas = sigmas
|
| 136 |
+
self.timesteps = sigmas * num_train_timesteps
|
| 137 |
+
|
| 138 |
+
self.model_outputs = [None] * solver_order
|
| 139 |
+
self.timestep_list = [None] * solver_order
|
| 140 |
+
self.lower_order_nums = 0
|
| 141 |
+
self.disable_corrector = disable_corrector
|
| 142 |
+
self.solver_p = solver_p
|
| 143 |
+
self.last_sample = None
|
| 144 |
+
self._step_index = None
|
| 145 |
+
self._begin_index = None
|
| 146 |
+
|
| 147 |
+
self.sigmas = self.sigmas.to(
|
| 148 |
+
"cpu") # to avoid too much CPU/GPU communication
|
| 149 |
+
self.sigma_min = self.sigmas[-1].item()
|
| 150 |
+
self.sigma_max = self.sigmas[0].item()
|
| 151 |
+
|
| 152 |
+
@property
|
| 153 |
+
def step_index(self):
|
| 154 |
+
"""
|
| 155 |
+
The index counter for current timestep. It will increase 1 after each scheduler step.
|
| 156 |
+
"""
|
| 157 |
+
return self._step_index
|
| 158 |
+
|
| 159 |
+
@property
|
| 160 |
+
def begin_index(self):
|
| 161 |
+
"""
|
| 162 |
+
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
|
| 163 |
+
"""
|
| 164 |
+
return self._begin_index
|
| 165 |
+
|
| 166 |
+
# Copied from diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler.set_begin_index
|
| 167 |
+
def set_begin_index(self, begin_index: int = 0):
|
| 168 |
+
"""
|
| 169 |
+
Sets the begin index for the scheduler. This function should be run from pipeline before the inference.
|
| 170 |
+
|
| 171 |
+
Args:
|
| 172 |
+
begin_index (`int`):
|
| 173 |
+
The begin index for the scheduler.
|
| 174 |
+
"""
|
| 175 |
+
self._begin_index = begin_index
|
| 176 |
+
|
| 177 |
+
# Modified from diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler.set_timesteps
|
| 178 |
+
def set_timesteps(
|
| 179 |
+
self,
|
| 180 |
+
num_inference_steps: Union[int, None] = None,
|
| 181 |
+
device: Union[str, torch.device] = None,
|
| 182 |
+
sigmas: Optional[List[float]] = None,
|
| 183 |
+
mu: Optional[Union[float, None]] = None,
|
| 184 |
+
shift: Optional[Union[float, None]] = None,
|
| 185 |
+
):
|
| 186 |
+
"""
|
| 187 |
+
Sets the discrete timesteps used for the diffusion chain (to be run before inference).
|
| 188 |
+
Args:
|
| 189 |
+
num_inference_steps (`int`):
|
| 190 |
+
Total number of the spacing of the time steps.
|
| 191 |
+
device (`str` or `torch.device`, *optional*):
|
| 192 |
+
The device to which the timesteps should be moved to. If `None`, the timesteps are not moved.
|
| 193 |
+
"""
|
| 194 |
+
|
| 195 |
+
if self.config.use_dynamic_shifting and mu is None:
|
| 196 |
+
raise ValueError(
|
| 197 |
+
" you have to pass a value for `mu` when `use_dynamic_shifting` is set to be `True`"
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
if sigmas is None:
|
| 201 |
+
sigmas = np.linspace(self.sigma_max, self.sigma_min,
|
| 202 |
+
num_inference_steps +
|
| 203 |
+
1).copy()[:-1] # pyright: ignore
|
| 204 |
+
|
| 205 |
+
if self.config.use_dynamic_shifting:
|
| 206 |
+
sigmas = self.time_shift(mu, 1.0, sigmas) # pyright: ignore
|
| 207 |
+
else:
|
| 208 |
+
if shift is None:
|
| 209 |
+
shift = self.config.shift
|
| 210 |
+
sigmas = shift * sigmas / (1 +
|
| 211 |
+
(shift - 1) * sigmas) # pyright: ignore
|
| 212 |
+
|
| 213 |
+
if self.config.final_sigmas_type == "sigma_min":
|
| 214 |
+
sigma_last = ((1 - self.alphas_cumprod[0]) /
|
| 215 |
+
self.alphas_cumprod[0])**0.5
|
| 216 |
+
elif self.config.final_sigmas_type == "zero":
|
| 217 |
+
sigma_last = 0
|
| 218 |
+
else:
|
| 219 |
+
raise ValueError(
|
| 220 |
+
f"`final_sigmas_type` must be one of 'zero', or 'sigma_min', but got {self.config.final_sigmas_type}"
|
| 221 |
+
)
|
| 222 |
+
|
| 223 |
+
timesteps = sigmas * self.config.num_train_timesteps
|
| 224 |
+
sigmas = np.concatenate([sigmas, [sigma_last]
|
| 225 |
+
]).astype(np.float32) # pyright: ignore
|
| 226 |
+
|
| 227 |
+
self.sigmas = torch.from_numpy(sigmas)
|
| 228 |
+
self.timesteps = torch.from_numpy(timesteps).to(
|
| 229 |
+
device=device, dtype=torch.int64)
|
| 230 |
+
|
| 231 |
+
self.num_inference_steps = len(timesteps)
|
| 232 |
+
|
| 233 |
+
self.model_outputs = [
|
| 234 |
+
None,
|
| 235 |
+
] * self.config.solver_order
|
| 236 |
+
self.lower_order_nums = 0
|
| 237 |
+
self.last_sample = None
|
| 238 |
+
if self.solver_p:
|
| 239 |
+
self.solver_p.set_timesteps(self.num_inference_steps, device=device)
|
| 240 |
+
|
| 241 |
+
# add an index counter for schedulers that allow duplicated timesteps
|
| 242 |
+
self._step_index = None
|
| 243 |
+
self._begin_index = None
|
| 244 |
+
self.sigmas = self.sigmas.to(
|
| 245 |
+
"cpu") # to avoid too much CPU/GPU communication
|
| 246 |
+
|
| 247 |
+
# Copied from diffusers.schedulers.scheduling_ddpm.DDPMScheduler._threshold_sample
|
| 248 |
+
def _threshold_sample(self, sample: torch.Tensor) -> torch.Tensor:
|
| 249 |
+
"""
|
| 250 |
+
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the
|
| 251 |
+
prediction of x_0 at timestep t), and if s > 1, then we threshold xt0 to the range [-s, s] and then divide by
|
| 252 |
+
s. Dynamic thresholding pushes saturated pixels (those near -1 and 1) inwards, thereby actively preventing
|
| 253 |
+
pixels from saturation at each step. We find that dynamic thresholding results in significantly better
|
| 254 |
+
photorealism as well as better image-text alignment, especially when using very large guidance weights."
|
| 255 |
+
|
| 256 |
+
https://arxiv.org/abs/2205.11487
|
| 257 |
+
"""
|
| 258 |
+
dtype = sample.dtype
|
| 259 |
+
batch_size, channels, *remaining_dims = sample.shape
|
| 260 |
+
|
| 261 |
+
if dtype not in (torch.float32, torch.float64):
|
| 262 |
+
sample = sample.float(
|
| 263 |
+
) # upcast for quantile calculation, and clamp not implemented for cpu half
|
| 264 |
+
|
| 265 |
+
# Flatten sample for doing quantile calculation along each image
|
| 266 |
+
sample = sample.reshape(batch_size, channels * np.prod(remaining_dims))
|
| 267 |
+
|
| 268 |
+
abs_sample = sample.abs() # "a certain percentile absolute pixel value"
|
| 269 |
+
|
| 270 |
+
s = torch.quantile(
|
| 271 |
+
abs_sample, self.config.dynamic_thresholding_ratio, dim=1)
|
| 272 |
+
s = torch.clamp(
|
| 273 |
+
s, min=1, max=self.config.sample_max_value
|
| 274 |
+
) # When clamped to min=1, equivalent to standard clipping to [-1, 1]
|
| 275 |
+
s = s.unsqueeze(
|
| 276 |
+
1) # (batch_size, 1) because clamp will broadcast along dim=0
|
| 277 |
+
sample = torch.clamp(
|
| 278 |
+
sample, -s, s
|
| 279 |
+
) / s # "we threshold xt0 to the range [-s, s] and then divide by s"
|
| 280 |
+
|
| 281 |
+
sample = sample.reshape(batch_size, channels, *remaining_dims)
|
| 282 |
+
sample = sample.to(dtype)
|
| 283 |
+
|
| 284 |
+
return sample
|
| 285 |
+
|
| 286 |
+
# Copied from diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler._sigma_to_t
|
| 287 |
+
def _sigma_to_t(self, sigma):
|
| 288 |
+
return sigma * self.config.num_train_timesteps
|
| 289 |
+
|
| 290 |
+
def _sigma_to_alpha_sigma_t(self, sigma):
|
| 291 |
+
return 1 - sigma, sigma
|
| 292 |
+
|
| 293 |
+
# Copied from diffusers.schedulers.scheduling_flow_match_euler_discrete.set_timesteps
|
| 294 |
+
def time_shift(self, mu: float, sigma: float, t: torch.Tensor):
|
| 295 |
+
return math.exp(mu) / (math.exp(mu) + (1 / t - 1)**sigma)
|
| 296 |
+
|
| 297 |
+
def convert_model_output(
|
| 298 |
+
self,
|
| 299 |
+
model_output: torch.Tensor,
|
| 300 |
+
*args,
|
| 301 |
+
sample: torch.Tensor = None,
|
| 302 |
+
**kwargs,
|
| 303 |
+
) -> torch.Tensor:
|
| 304 |
+
r"""
|
| 305 |
+
Convert the model output to the corresponding type the UniPC algorithm needs.
|
| 306 |
+
|
| 307 |
+
Args:
|
| 308 |
+
model_output (`torch.Tensor`):
|
| 309 |
+
The direct output from the learned diffusion model.
|
| 310 |
+
timestep (`int`):
|
| 311 |
+
The current discrete timestep in the diffusion chain.
|
| 312 |
+
sample (`torch.Tensor`):
|
| 313 |
+
A current instance of a sample created by the diffusion process.
|
| 314 |
+
|
| 315 |
+
Returns:
|
| 316 |
+
`torch.Tensor`:
|
| 317 |
+
The converted model output.
|
| 318 |
+
"""
|
| 319 |
+
timestep = args[0] if len(args) > 0 else kwargs.pop("timestep", None)
|
| 320 |
+
if sample is None:
|
| 321 |
+
if len(args) > 1:
|
| 322 |
+
sample = args[1]
|
| 323 |
+
else:
|
| 324 |
+
raise ValueError(
|
| 325 |
+
"missing `sample` as a required keyward argument")
|
| 326 |
+
if timestep is not None:
|
| 327 |
+
deprecate(
|
| 328 |
+
"timesteps",
|
| 329 |
+
"1.0.0",
|
| 330 |
+
"Passing `timesteps` is deprecated and has no effect as model output conversion is now handled via an internal counter `self.step_index`",
|
| 331 |
+
)
|
| 332 |
+
|
| 333 |
+
sigma = self.sigmas[self.step_index]
|
| 334 |
+
alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma)
|
| 335 |
+
|
| 336 |
+
if self.predict_x0:
|
| 337 |
+
if self.config.prediction_type == "flow_prediction":
|
| 338 |
+
sigma_t = self.sigmas[self.step_index]
|
| 339 |
+
x0_pred = sample - sigma_t * model_output
|
| 340 |
+
else:
|
| 341 |
+
raise ValueError(
|
| 342 |
+
f"prediction_type given as {self.config.prediction_type} must be one of `epsilon`, `sample`,"
|
| 343 |
+
" `v_prediction` or `flow_prediction` for the UniPCMultistepScheduler."
|
| 344 |
+
)
|
| 345 |
+
|
| 346 |
+
if self.config.thresholding:
|
| 347 |
+
x0_pred = self._threshold_sample(x0_pred)
|
| 348 |
+
|
| 349 |
+
return x0_pred
|
| 350 |
+
else:
|
| 351 |
+
if self.config.prediction_type == "flow_prediction":
|
| 352 |
+
sigma_t = self.sigmas[self.step_index]
|
| 353 |
+
epsilon = sample - (1 - sigma_t) * model_output
|
| 354 |
+
else:
|
| 355 |
+
raise ValueError(
|
| 356 |
+
f"prediction_type given as {self.config.prediction_type} must be one of `epsilon`, `sample`,"
|
| 357 |
+
" `v_prediction` or `flow_prediction` for the UniPCMultistepScheduler."
|
| 358 |
+
)
|
| 359 |
+
|
| 360 |
+
if self.config.thresholding:
|
| 361 |
+
sigma_t = self.sigmas[self.step_index]
|
| 362 |
+
x0_pred = sample - sigma_t * model_output
|
| 363 |
+
x0_pred = self._threshold_sample(x0_pred)
|
| 364 |
+
epsilon = model_output + x0_pred
|
| 365 |
+
|
| 366 |
+
return epsilon
|
| 367 |
+
|
| 368 |
+
def multistep_uni_p_bh_update(
|
| 369 |
+
self,
|
| 370 |
+
model_output: torch.Tensor,
|
| 371 |
+
*args,
|
| 372 |
+
sample: torch.Tensor = None,
|
| 373 |
+
order: int = None, # pyright: ignore
|
| 374 |
+
**kwargs,
|
| 375 |
+
) -> torch.Tensor:
|
| 376 |
+
"""
|
| 377 |
+
One step for the UniP (B(h) version). Alternatively, `self.solver_p` is used if is specified.
|
| 378 |
+
|
| 379 |
+
Args:
|
| 380 |
+
model_output (`torch.Tensor`):
|
| 381 |
+
The direct output from the learned diffusion model at the current timestep.
|
| 382 |
+
prev_timestep (`int`):
|
| 383 |
+
The previous discrete timestep in the diffusion chain.
|
| 384 |
+
sample (`torch.Tensor`):
|
| 385 |
+
A current instance of a sample created by the diffusion process.
|
| 386 |
+
order (`int`):
|
| 387 |
+
The order of UniP at this timestep (corresponds to the *p* in UniPC-p).
|
| 388 |
+
|
| 389 |
+
Returns:
|
| 390 |
+
`torch.Tensor`:
|
| 391 |
+
The sample tensor at the previous timestep.
|
| 392 |
+
"""
|
| 393 |
+
prev_timestep = args[0] if len(args) > 0 else kwargs.pop(
|
| 394 |
+
"prev_timestep", None)
|
| 395 |
+
if sample is None:
|
| 396 |
+
if len(args) > 1:
|
| 397 |
+
sample = args[1]
|
| 398 |
+
else:
|
| 399 |
+
raise ValueError(
|
| 400 |
+
" missing `sample` as a required keyward argument")
|
| 401 |
+
if order is None:
|
| 402 |
+
if len(args) > 2:
|
| 403 |
+
order = args[2]
|
| 404 |
+
else:
|
| 405 |
+
raise ValueError(
|
| 406 |
+
" missing `order` as a required keyward argument")
|
| 407 |
+
if prev_timestep is not None:
|
| 408 |
+
deprecate(
|
| 409 |
+
"prev_timestep",
|
| 410 |
+
"1.0.0",
|
| 411 |
+
"Passing `prev_timestep` is deprecated and has no effect as model output conversion is now handled via an internal counter `self.step_index`",
|
| 412 |
+
)
|
| 413 |
+
model_output_list = self.model_outputs
|
| 414 |
+
|
| 415 |
+
s0 = self.timestep_list[-1]
|
| 416 |
+
m0 = model_output_list[-1]
|
| 417 |
+
x = sample
|
| 418 |
+
|
| 419 |
+
if self.solver_p:
|
| 420 |
+
x_t = self.solver_p.step(model_output, s0, x).prev_sample
|
| 421 |
+
return x_t
|
| 422 |
+
|
| 423 |
+
sigma_t, sigma_s0 = self.sigmas[self.step_index + 1], self.sigmas[
|
| 424 |
+
self.step_index] # pyright: ignore
|
| 425 |
+
alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma_t)
|
| 426 |
+
alpha_s0, sigma_s0 = self._sigma_to_alpha_sigma_t(sigma_s0)
|
| 427 |
+
|
| 428 |
+
lambda_t = torch.log(alpha_t) - torch.log(sigma_t)
|
| 429 |
+
lambda_s0 = torch.log(alpha_s0) - torch.log(sigma_s0)
|
| 430 |
+
|
| 431 |
+
h = lambda_t - lambda_s0
|
| 432 |
+
device = sample.device
|
| 433 |
+
|
| 434 |
+
rks = []
|
| 435 |
+
D1s = []
|
| 436 |
+
for i in range(1, order):
|
| 437 |
+
si = self.step_index - i # pyright: ignore
|
| 438 |
+
mi = model_output_list[-(i + 1)]
|
| 439 |
+
alpha_si, sigma_si = self._sigma_to_alpha_sigma_t(self.sigmas[si])
|
| 440 |
+
lambda_si = torch.log(alpha_si) - torch.log(sigma_si)
|
| 441 |
+
rk = (lambda_si - lambda_s0) / h
|
| 442 |
+
rks.append(rk)
|
| 443 |
+
D1s.append((mi - m0) / rk) # pyright: ignore
|
| 444 |
+
|
| 445 |
+
rks.append(1.0)
|
| 446 |
+
rks = torch.tensor(rks, device=device)
|
| 447 |
+
|
| 448 |
+
R = []
|
| 449 |
+
b = []
|
| 450 |
+
|
| 451 |
+
hh = -h if self.predict_x0 else h
|
| 452 |
+
h_phi_1 = torch.expm1(hh) # h\phi_1(h) = e^h - 1
|
| 453 |
+
h_phi_k = h_phi_1 / hh - 1
|
| 454 |
+
|
| 455 |
+
factorial_i = 1
|
| 456 |
+
|
| 457 |
+
if self.config.solver_type == "bh1":
|
| 458 |
+
B_h = hh
|
| 459 |
+
elif self.config.solver_type == "bh2":
|
| 460 |
+
B_h = torch.expm1(hh)
|
| 461 |
+
else:
|
| 462 |
+
raise NotImplementedError()
|
| 463 |
+
|
| 464 |
+
for i in range(1, order + 1):
|
| 465 |
+
R.append(torch.pow(rks, i - 1))
|
| 466 |
+
b.append(h_phi_k * factorial_i / B_h)
|
| 467 |
+
factorial_i *= i + 1
|
| 468 |
+
h_phi_k = h_phi_k / hh - 1 / factorial_i
|
| 469 |
+
|
| 470 |
+
R = torch.stack(R)
|
| 471 |
+
b = torch.tensor(b, device=device)
|
| 472 |
+
|
| 473 |
+
if len(D1s) > 0:
|
| 474 |
+
D1s = torch.stack(D1s, dim=1) # (B, K)
|
| 475 |
+
# for order 2, we use a simplified version
|
| 476 |
+
if order == 2:
|
| 477 |
+
rhos_p = torch.tensor([0.5], dtype=x.dtype, device=device)
|
| 478 |
+
else:
|
| 479 |
+
rhos_p = torch.linalg.solve(R[:-1, :-1],
|
| 480 |
+
b[:-1]).to(device).to(x.dtype)
|
| 481 |
+
else:
|
| 482 |
+
D1s = None
|
| 483 |
+
|
| 484 |
+
if self.predict_x0:
|
| 485 |
+
x_t_ = sigma_t / sigma_s0 * x - alpha_t * h_phi_1 * m0
|
| 486 |
+
if D1s is not None:
|
| 487 |
+
pred_res = torch.einsum("k,bkc...->bc...", rhos_p,
|
| 488 |
+
D1s) # pyright: ignore
|
| 489 |
+
else:
|
| 490 |
+
pred_res = 0
|
| 491 |
+
x_t = x_t_ - alpha_t * B_h * pred_res
|
| 492 |
+
else:
|
| 493 |
+
x_t_ = alpha_t / alpha_s0 * x - sigma_t * h_phi_1 * m0
|
| 494 |
+
if D1s is not None:
|
| 495 |
+
pred_res = torch.einsum("k,bkc...->bc...", rhos_p,
|
| 496 |
+
D1s) # pyright: ignore
|
| 497 |
+
else:
|
| 498 |
+
pred_res = 0
|
| 499 |
+
x_t = x_t_ - sigma_t * B_h * pred_res
|
| 500 |
+
|
| 501 |
+
x_t = x_t.to(x.dtype)
|
| 502 |
+
return x_t
|
| 503 |
+
|
| 504 |
+
def multistep_uni_c_bh_update(
|
| 505 |
+
self,
|
| 506 |
+
this_model_output: torch.Tensor,
|
| 507 |
+
*args,
|
| 508 |
+
last_sample: torch.Tensor = None,
|
| 509 |
+
this_sample: torch.Tensor = None,
|
| 510 |
+
order: int = None, # pyright: ignore
|
| 511 |
+
**kwargs,
|
| 512 |
+
) -> torch.Tensor:
|
| 513 |
+
"""
|
| 514 |
+
One step for the UniC (B(h) version).
|
| 515 |
+
|
| 516 |
+
Args:
|
| 517 |
+
this_model_output (`torch.Tensor`):
|
| 518 |
+
The model outputs at `x_t`.
|
| 519 |
+
this_timestep (`int`):
|
| 520 |
+
The current timestep `t`.
|
| 521 |
+
last_sample (`torch.Tensor`):
|
| 522 |
+
The generated sample before the last predictor `x_{t-1}`.
|
| 523 |
+
this_sample (`torch.Tensor`):
|
| 524 |
+
The generated sample after the last predictor `x_{t}`.
|
| 525 |
+
order (`int`):
|
| 526 |
+
The `p` of UniC-p at this step. The effective order of accuracy should be `order + 1`.
|
| 527 |
+
|
| 528 |
+
Returns:
|
| 529 |
+
`torch.Tensor`:
|
| 530 |
+
The corrected sample tensor at the current timestep.
|
| 531 |
+
"""
|
| 532 |
+
this_timestep = args[0] if len(args) > 0 else kwargs.pop(
|
| 533 |
+
"this_timestep", None)
|
| 534 |
+
if last_sample is None:
|
| 535 |
+
if len(args) > 1:
|
| 536 |
+
last_sample = args[1]
|
| 537 |
+
else:
|
| 538 |
+
raise ValueError(
|
| 539 |
+
" missing`last_sample` as a required keyward argument")
|
| 540 |
+
if this_sample is None:
|
| 541 |
+
if len(args) > 2:
|
| 542 |
+
this_sample = args[2]
|
| 543 |
+
else:
|
| 544 |
+
raise ValueError(
|
| 545 |
+
" missing`this_sample` as a required keyward argument")
|
| 546 |
+
if order is None:
|
| 547 |
+
if len(args) > 3:
|
| 548 |
+
order = args[3]
|
| 549 |
+
else:
|
| 550 |
+
raise ValueError(
|
| 551 |
+
" missing`order` as a required keyward argument")
|
| 552 |
+
if this_timestep is not None:
|
| 553 |
+
deprecate(
|
| 554 |
+
"this_timestep",
|
| 555 |
+
"1.0.0",
|
| 556 |
+
"Passing `this_timestep` is deprecated and has no effect as model output conversion is now handled via an internal counter `self.step_index`",
|
| 557 |
+
)
|
| 558 |
+
|
| 559 |
+
model_output_list = self.model_outputs
|
| 560 |
+
|
| 561 |
+
m0 = model_output_list[-1]
|
| 562 |
+
x = last_sample
|
| 563 |
+
x_t = this_sample
|
| 564 |
+
model_t = this_model_output
|
| 565 |
+
|
| 566 |
+
sigma_t, sigma_s0 = self.sigmas[self.step_index], self.sigmas[
|
| 567 |
+
self.step_index - 1] # pyright: ignore
|
| 568 |
+
alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma_t)
|
| 569 |
+
alpha_s0, sigma_s0 = self._sigma_to_alpha_sigma_t(sigma_s0)
|
| 570 |
+
|
| 571 |
+
lambda_t = torch.log(alpha_t) - torch.log(sigma_t)
|
| 572 |
+
lambda_s0 = torch.log(alpha_s0) - torch.log(sigma_s0)
|
| 573 |
+
|
| 574 |
+
h = lambda_t - lambda_s0
|
| 575 |
+
device = this_sample.device
|
| 576 |
+
|
| 577 |
+
rks = []
|
| 578 |
+
D1s = []
|
| 579 |
+
for i in range(1, order):
|
| 580 |
+
si = self.step_index - (i + 1) # pyright: ignore
|
| 581 |
+
mi = model_output_list[-(i + 1)]
|
| 582 |
+
alpha_si, sigma_si = self._sigma_to_alpha_sigma_t(self.sigmas[si])
|
| 583 |
+
lambda_si = torch.log(alpha_si) - torch.log(sigma_si)
|
| 584 |
+
rk = (lambda_si - lambda_s0) / h
|
| 585 |
+
rks.append(rk)
|
| 586 |
+
D1s.append((mi - m0) / rk) # pyright: ignore
|
| 587 |
+
|
| 588 |
+
rks.append(1.0)
|
| 589 |
+
rks = torch.tensor(rks, device=device)
|
| 590 |
+
|
| 591 |
+
R = []
|
| 592 |
+
b = []
|
| 593 |
+
|
| 594 |
+
hh = -h if self.predict_x0 else h
|
| 595 |
+
h_phi_1 = torch.expm1(hh) # h\phi_1(h) = e^h - 1
|
| 596 |
+
h_phi_k = h_phi_1 / hh - 1
|
| 597 |
+
|
| 598 |
+
factorial_i = 1
|
| 599 |
+
|
| 600 |
+
if self.config.solver_type == "bh1":
|
| 601 |
+
B_h = hh
|
| 602 |
+
elif self.config.solver_type == "bh2":
|
| 603 |
+
B_h = torch.expm1(hh)
|
| 604 |
+
else:
|
| 605 |
+
raise NotImplementedError()
|
| 606 |
+
|
| 607 |
+
for i in range(1, order + 1):
|
| 608 |
+
R.append(torch.pow(rks, i - 1))
|
| 609 |
+
b.append(h_phi_k * factorial_i / B_h)
|
| 610 |
+
factorial_i *= i + 1
|
| 611 |
+
h_phi_k = h_phi_k / hh - 1 / factorial_i
|
| 612 |
+
|
| 613 |
+
R = torch.stack(R)
|
| 614 |
+
b = torch.tensor(b, device=device)
|
| 615 |
+
|
| 616 |
+
if len(D1s) > 0:
|
| 617 |
+
D1s = torch.stack(D1s, dim=1)
|
| 618 |
+
else:
|
| 619 |
+
D1s = None
|
| 620 |
+
|
| 621 |
+
# for order 1, we use a simplified version
|
| 622 |
+
if order == 1:
|
| 623 |
+
rhos_c = torch.tensor([0.5], dtype=x.dtype, device=device)
|
| 624 |
+
else:
|
| 625 |
+
rhos_c = torch.linalg.solve(R, b).to(device).to(x.dtype)
|
| 626 |
+
|
| 627 |
+
if self.predict_x0:
|
| 628 |
+
x_t_ = sigma_t / sigma_s0 * x - alpha_t * h_phi_1 * m0
|
| 629 |
+
if D1s is not None:
|
| 630 |
+
corr_res = torch.einsum("k,bkc...->bc...", rhos_c[:-1], D1s)
|
| 631 |
+
else:
|
| 632 |
+
corr_res = 0
|
| 633 |
+
D1_t = model_t - m0
|
| 634 |
+
x_t = x_t_ - alpha_t * B_h * (corr_res + rhos_c[-1] * D1_t)
|
| 635 |
+
else:
|
| 636 |
+
x_t_ = alpha_t / alpha_s0 * x - sigma_t * h_phi_1 * m0
|
| 637 |
+
if D1s is not None:
|
| 638 |
+
corr_res = torch.einsum("k,bkc...->bc...", rhos_c[:-1], D1s)
|
| 639 |
+
else:
|
| 640 |
+
corr_res = 0
|
| 641 |
+
D1_t = model_t - m0
|
| 642 |
+
x_t = x_t_ - sigma_t * B_h * (corr_res + rhos_c[-1] * D1_t)
|
| 643 |
+
x_t = x_t.to(x.dtype)
|
| 644 |
+
return x_t
|
| 645 |
+
|
| 646 |
+
def index_for_timestep(self, timestep, schedule_timesteps=None):
|
| 647 |
+
if schedule_timesteps is None:
|
| 648 |
+
schedule_timesteps = self.timesteps
|
| 649 |
+
|
| 650 |
+
indices = (schedule_timesteps == timestep).nonzero()
|
| 651 |
+
|
| 652 |
+
# The sigma index that is taken for the **very** first `step`
|
| 653 |
+
# is always the second index (or the last index if there is only 1)
|
| 654 |
+
# This way we can ensure we don't accidentally skip a sigma in
|
| 655 |
+
# case we start in the middle of the denoising schedule (e.g. for image-to-image)
|
| 656 |
+
pos = 1 if len(indices) > 1 else 0
|
| 657 |
+
|
| 658 |
+
return indices[pos].item()
|
| 659 |
+
|
| 660 |
+
# Copied from diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler._init_step_index
|
| 661 |
+
def _init_step_index(self, timestep):
|
| 662 |
+
"""
|
| 663 |
+
Initialize the step_index counter for the scheduler.
|
| 664 |
+
"""
|
| 665 |
+
|
| 666 |
+
if self.begin_index is None:
|
| 667 |
+
if isinstance(timestep, torch.Tensor):
|
| 668 |
+
timestep = timestep.to(self.timesteps.device)
|
| 669 |
+
self._step_index = self.index_for_timestep(timestep)
|
| 670 |
+
else:
|
| 671 |
+
self._step_index = self._begin_index
|
| 672 |
+
|
| 673 |
+
def step(self,
|
| 674 |
+
model_output: torch.Tensor,
|
| 675 |
+
timestep: Union[int, torch.Tensor],
|
| 676 |
+
sample: torch.Tensor,
|
| 677 |
+
return_dict: bool = True,
|
| 678 |
+
generator=None) -> Union[SchedulerOutput, Tuple]:
|
| 679 |
+
"""
|
| 680 |
+
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
|
| 681 |
+
the multistep UniPC.
|
| 682 |
+
|
| 683 |
+
Args:
|
| 684 |
+
model_output (`torch.Tensor`):
|
| 685 |
+
The direct output from learned diffusion model.
|
| 686 |
+
timestep (`int`):
|
| 687 |
+
The current discrete timestep in the diffusion chain.
|
| 688 |
+
sample (`torch.Tensor`):
|
| 689 |
+
A current instance of a sample created by the diffusion process.
|
| 690 |
+
return_dict (`bool`):
|
| 691 |
+
Whether or not to return a [`~schedulers.scheduling_utils.SchedulerOutput`] or `tuple`.
|
| 692 |
+
|
| 693 |
+
Returns:
|
| 694 |
+
[`~schedulers.scheduling_utils.SchedulerOutput`] or `tuple`:
|
| 695 |
+
If return_dict is `True`, [`~schedulers.scheduling_utils.SchedulerOutput`] is returned, otherwise a
|
| 696 |
+
tuple is returned where the first element is the sample tensor.
|
| 697 |
+
|
| 698 |
+
"""
|
| 699 |
+
if self.num_inference_steps is None:
|
| 700 |
+
raise ValueError(
|
| 701 |
+
"Number of inference steps is 'None', you need to run 'set_timesteps' after creating the scheduler"
|
| 702 |
+
)
|
| 703 |
+
|
| 704 |
+
if self.step_index is None:
|
| 705 |
+
self._init_step_index(timestep)
|
| 706 |
+
|
| 707 |
+
use_corrector = (
|
| 708 |
+
self.step_index > 0 and
|
| 709 |
+
self.step_index - 1 not in self.disable_corrector and
|
| 710 |
+
self.last_sample is not None # pyright: ignore
|
| 711 |
+
)
|
| 712 |
+
|
| 713 |
+
model_output_convert = self.convert_model_output(
|
| 714 |
+
model_output, sample=sample)
|
| 715 |
+
if use_corrector:
|
| 716 |
+
sample = self.multistep_uni_c_bh_update(
|
| 717 |
+
this_model_output=model_output_convert,
|
| 718 |
+
last_sample=self.last_sample,
|
| 719 |
+
this_sample=sample,
|
| 720 |
+
order=self.this_order,
|
| 721 |
+
)
|
| 722 |
+
|
| 723 |
+
for i in range(self.config.solver_order - 1):
|
| 724 |
+
self.model_outputs[i] = self.model_outputs[i + 1]
|
| 725 |
+
self.timestep_list[i] = self.timestep_list[i + 1]
|
| 726 |
+
|
| 727 |
+
self.model_outputs[-1] = model_output_convert
|
| 728 |
+
self.timestep_list[-1] = timestep # pyright: ignore
|
| 729 |
+
|
| 730 |
+
if self.config.lower_order_final:
|
| 731 |
+
this_order = min(self.config.solver_order,
|
| 732 |
+
len(self.timesteps) -
|
| 733 |
+
self.step_index) # pyright: ignore
|
| 734 |
+
else:
|
| 735 |
+
this_order = self.config.solver_order
|
| 736 |
+
|
| 737 |
+
self.this_order = min(this_order,
|
| 738 |
+
self.lower_order_nums + 1) # warmup for multistep
|
| 739 |
+
assert self.this_order > 0
|
| 740 |
+
|
| 741 |
+
self.last_sample = sample
|
| 742 |
+
prev_sample = self.multistep_uni_p_bh_update(
|
| 743 |
+
model_output=model_output, # pass the original non-converted model output, in case solver-p is used
|
| 744 |
+
sample=sample,
|
| 745 |
+
order=self.this_order,
|
| 746 |
+
)
|
| 747 |
+
|
| 748 |
+
if self.lower_order_nums < self.config.solver_order:
|
| 749 |
+
self.lower_order_nums += 1
|
| 750 |
+
|
| 751 |
+
# upon completion increase step index by one
|
| 752 |
+
self._step_index += 1 # pyright: ignore
|
| 753 |
+
|
| 754 |
+
if not return_dict:
|
| 755 |
+
return (prev_sample,)
|
| 756 |
+
|
| 757 |
+
return SchedulerOutput(prev_sample=prev_sample)
|
| 758 |
+
|
| 759 |
+
def scale_model_input(self, sample: torch.Tensor, *args,
|
| 760 |
+
**kwargs) -> torch.Tensor:
|
| 761 |
+
"""
|
| 762 |
+
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
|
| 763 |
+
current timestep.
|
| 764 |
+
|
| 765 |
+
Args:
|
| 766 |
+
sample (`torch.Tensor`):
|
| 767 |
+
The input sample.
|
| 768 |
+
|
| 769 |
+
Returns:
|
| 770 |
+
`torch.Tensor`:
|
| 771 |
+
A scaled input sample.
|
| 772 |
+
"""
|
| 773 |
+
return sample
|
| 774 |
+
|
| 775 |
+
# Copied from diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler.add_noise
|
| 776 |
+
def add_noise(
|
| 777 |
+
self,
|
| 778 |
+
original_samples: torch.Tensor,
|
| 779 |
+
noise: torch.Tensor,
|
| 780 |
+
timesteps: torch.IntTensor,
|
| 781 |
+
) -> torch.Tensor:
|
| 782 |
+
# Make sure sigmas and timesteps have the same device and dtype as original_samples
|
| 783 |
+
sigmas = self.sigmas.to(
|
| 784 |
+
device=original_samples.device, dtype=original_samples.dtype)
|
| 785 |
+
if original_samples.device.type == "mps" and torch.is_floating_point(
|
| 786 |
+
timesteps):
|
| 787 |
+
# mps does not support float64
|
| 788 |
+
schedule_timesteps = self.timesteps.to(
|
| 789 |
+
original_samples.device, dtype=torch.float32)
|
| 790 |
+
timesteps = timesteps.to(
|
| 791 |
+
original_samples.device, dtype=torch.float32)
|
| 792 |
+
else:
|
| 793 |
+
schedule_timesteps = self.timesteps.to(original_samples.device)
|
| 794 |
+
timesteps = timesteps.to(original_samples.device)
|
| 795 |
+
|
| 796 |
+
# begin_index is None when the scheduler is used for training or pipeline does not implement set_begin_index
|
| 797 |
+
if self.begin_index is None:
|
| 798 |
+
step_indices = [
|
| 799 |
+
self.index_for_timestep(t, schedule_timesteps)
|
| 800 |
+
for t in timesteps
|
| 801 |
+
]
|
| 802 |
+
elif self.step_index is not None:
|
| 803 |
+
# add_noise is called after first denoising step (for inpainting)
|
| 804 |
+
step_indices = [self.step_index] * timesteps.shape[0]
|
| 805 |
+
else:
|
| 806 |
+
# add noise is called before first denoising step to create initial latent(img2img)
|
| 807 |
+
step_indices = [self.begin_index] * timesteps.shape[0]
|
| 808 |
+
|
| 809 |
+
sigma = sigmas[step_indices].flatten()
|
| 810 |
+
while len(sigma.shape) < len(original_samples.shape):
|
| 811 |
+
sigma = sigma.unsqueeze(-1)
|
| 812 |
+
|
| 813 |
+
alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma)
|
| 814 |
+
noisy_samples = alpha_t * original_samples + sigma_t * noise
|
| 815 |
+
return noisy_samples
|
| 816 |
+
|
| 817 |
+
def __len__(self):
|
| 818 |
+
return self.config.num_train_timesteps
|
source_revisions.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"lingbot_video_repo": "https://github.com/Robbyant/lingbot-video",
|
| 3 |
+
"lingbot_video_revision": "a2bb04b78edd848500dc27a26e035a95442ae186",
|
| 4 |
+
"sdnq_describe": "v0.2.1-17-gd841c38",
|
| 5 |
+
"sdnq_repo": "https://github.com/Disty0/sdnq",
|
| 6 |
+
"sdnq_revision": "d841c383ff7be38728d4df829e17af4f15d4fd66",
|
| 7 |
+
"source_repo_id": "robbyant/lingbot-video-moe-30b-a3b",
|
| 8 |
+
"source_revision": "f2e538f64afe00cc4ae674db2aeb52e2945edfd5",
|
| 9 |
+
"target_repo_id": "WaveCut/LingBot-Video-MoE-30B-A3B-SDNQ-uint4-static"
|
| 10 |
+
}
|
text_encoder/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-text-to-text
|
| 4 |
+
---
|
| 5 |
+
<a href="https://chat.qwenlm.ai/" target="_blank" style="margin: 2px;">
|
| 6 |
+
<img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
|
| 7 |
+
</a>
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
# Qwen3-VL-4B-Instruct
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
Meet Qwen3-VL — the most powerful vision-language model in the Qwen series to date.
|
| 14 |
+
|
| 15 |
+
This generation delivers comprehensive upgrades across the board: superior text understanding & generation, deeper visual perception & reasoning, extended context length, enhanced spatial and video dynamics comprehension, and stronger agent interaction capabilities.
|
| 16 |
+
|
| 17 |
+
Available in Dense and MoE architectures that scale from edge to cloud, with Instruct and reasoning‑enhanced Thinking editions for flexible, on‑demand deployment.
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#### Key Enhancements:
|
| 21 |
+
|
| 22 |
+
* **Visual Agent**: Operates PC/mobile GUIs—recognizes elements, understands functions, invokes tools, completes tasks.
|
| 23 |
+
|
| 24 |
+
* **Visual Coding Boost**: Generates Draw.io/HTML/CSS/JS from images/videos.
|
| 25 |
+
|
| 26 |
+
* **Advanced Spatial Perception**: Judges object positions, viewpoints, and occlusions; provides stronger 2D grounding and enables 3D grounding for spatial reasoning and embodied AI.
|
| 27 |
+
|
| 28 |
+
* **Long Context & Video Understanding**: Native 256K context, expandable to 1M; handles books and hours-long video with full recall and second-level indexing.
|
| 29 |
+
|
| 30 |
+
* **Enhanced Multimodal Reasoning**: Excels in STEM/Math—causal analysis and logical, evidence-based answers.
|
| 31 |
+
|
| 32 |
+
* **Upgraded Visual Recognition**: Broader, higher-quality pretraining is able to “recognize everything”—celebrities, anime, products, landmarks, flora/fauna, etc.
|
| 33 |
+
|
| 34 |
+
* **Expanded OCR**: Supports 32 languages (up from 19); robust in low light, blur, and tilt; better with rare/ancient characters and jargon; improved long-document structure parsing.
|
| 35 |
+
|
| 36 |
+
* **Text Understanding on par with pure LLMs**: Seamless text–vision fusion for lossless, unified comprehension.
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
#### Model Architecture Updates:
|
| 40 |
+
|
| 41 |
+
<p align="center">
|
| 42 |
+
<img src="https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3-VL/qwen3vl_arc.jpg" width="80%"/>
|
| 43 |
+
<p>
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
1. **Interleaved-MRoPE**: Full‑frequency allocation over time, width, and height via robust positional embeddings, enhancing long‑horizon video reasoning.
|
| 47 |
+
|
| 48 |
+
2. **DeepStack**: Fuses multi‑level ViT features to capture fine‑grained details and sharpen image–text alignment.
|
| 49 |
+
|
| 50 |
+
3. **Text–Timestamp Alignment:** Moves beyond T‑RoPE to precise, timestamp‑grounded event localization for stronger video temporal modeling.
|
| 51 |
+
|
| 52 |
+
This is the weight repository for Qwen3-VL-4B-Instruct.
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## Model Performance
|
| 58 |
+
|
| 59 |
+
**Multimodal performance**
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
**Pure text performance**
|
| 64 |
+

|
| 65 |
+
|
| 66 |
+
## Quickstart
|
| 67 |
+
|
| 68 |
+
Below, we provide simple examples to show how to use Qwen3-VL with 🤖 ModelScope and 🤗 Transformers.
|
| 69 |
+
|
| 70 |
+
The code of Qwen3-VL has been in the latest Hugging Face transformers and we advise you to build from source with command:
|
| 71 |
+
```
|
| 72 |
+
pip install git+https://github.com/huggingface/transformers
|
| 73 |
+
# pip install transformers==4.57.0 # currently, V4.57.0 is not released
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
### Using 🤗 Transformers to Chat
|
| 77 |
+
|
| 78 |
+
Here we show a code snippet to show how to use the chat model with `transformers`:
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
|
| 82 |
+
|
| 83 |
+
# default: Load the model on the available device(s)
|
| 84 |
+
model = Qwen3VLForConditionalGeneration.from_pretrained(
|
| 85 |
+
"Qwen/Qwen3-VL-4B-Instruct", dtype="auto", device_map="auto"
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
# We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
|
| 89 |
+
# model = Qwen3VLForConditionalGeneration.from_pretrained(
|
| 90 |
+
# "Qwen/Qwen3-VL-4B-Instruct",
|
| 91 |
+
# dtype=torch.bfloat16,
|
| 92 |
+
# attn_implementation="flash_attention_2",
|
| 93 |
+
# device_map="auto",
|
| 94 |
+
# )
|
| 95 |
+
|
| 96 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen/Qwen3-VL-4B-Instruct")
|
| 97 |
+
|
| 98 |
+
messages = [
|
| 99 |
+
{
|
| 100 |
+
"role": "user",
|
| 101 |
+
"content": [
|
| 102 |
+
{
|
| 103 |
+
"type": "image",
|
| 104 |
+
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
|
| 105 |
+
},
|
| 106 |
+
{"type": "text", "text": "Describe this image."},
|
| 107 |
+
],
|
| 108 |
+
}
|
| 109 |
+
]
|
| 110 |
+
|
| 111 |
+
# Preparation for inference
|
| 112 |
+
inputs = processor.apply_chat_template(
|
| 113 |
+
messages,
|
| 114 |
+
tokenize=True,
|
| 115 |
+
add_generation_prompt=True,
|
| 116 |
+
return_dict=True,
|
| 117 |
+
return_tensors="pt"
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
# Inference: Generation of the output
|
| 121 |
+
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
| 122 |
+
generated_ids_trimmed = [
|
| 123 |
+
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
|
| 124 |
+
]
|
| 125 |
+
output_text = processor.batch_decode(
|
| 126 |
+
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 127 |
+
)
|
| 128 |
+
print(output_text)
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
### Generation Hyperparameters
|
| 132 |
+
#### VL
|
| 133 |
+
```bash
|
| 134 |
+
export greedy='false'
|
| 135 |
+
export top_p=0.8
|
| 136 |
+
export top_k=20
|
| 137 |
+
export temperature=0.7
|
| 138 |
+
export repetition_penalty=1.0
|
| 139 |
+
export presence_penalty=1.5
|
| 140 |
+
export out_seq_length=16384
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
#### Text
|
| 144 |
+
```bash
|
| 145 |
+
export greedy='false'
|
| 146 |
+
export top_p=1.0
|
| 147 |
+
export top_k=40
|
| 148 |
+
export repetition_penalty=1.0
|
| 149 |
+
export presence_penalty=2.0
|
| 150 |
+
export temperature=1.0
|
| 151 |
+
export out_seq_length=32768
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
## Citation
|
| 156 |
+
|
| 157 |
+
If you find our work helpful, feel free to give us a cite.
|
| 158 |
+
|
| 159 |
+
```
|
| 160 |
+
@misc{qwen3technicalreport,
|
| 161 |
+
title={Qwen3 Technical Report},
|
| 162 |
+
author={Qwen Team},
|
| 163 |
+
year={2025},
|
| 164 |
+
eprint={2505.09388},
|
| 165 |
+
archivePrefix={arXiv},
|
| 166 |
+
primaryClass={cs.CL},
|
| 167 |
+
url={https://arxiv.org/abs/2505.09388},
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
@article{Qwen2.5-VL,
|
| 171 |
+
title={Qwen2.5-VL Technical Report},
|
| 172 |
+
author={Bai, Shuai and Chen, Keqin and Liu, Xuejing and Wang, Jialin and Ge, Wenbin and Song, Sibo and Dang, Kai and Wang, Peng and Wang, Shijie and Tang, Jun and Zhong, Humen and Zhu, Yuanzhi and Yang, Mingkun and Li, Zhaohai and Wan, Jianqiang and Wang, Pengfei and Ding, Wei and Fu, Zheren and Xu, Yiheng and Ye, Jiabo and Zhang, Xi and Xie, Tianbao and Cheng, Zesen and Zhang, Hang and Yang, Zhibo and Xu, Haiyang and Lin, Junyang},
|
| 173 |
+
journal={arXiv preprint arXiv:2502.13923},
|
| 174 |
+
year={2025}
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
@article{Qwen2VL,
|
| 178 |
+
title={Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution},
|
| 179 |
+
author={Wang, Peng and Bai, Shuai and Tan, Sinan and Wang, Shijie and Fan, Zhihao and Bai, Jinze and Chen, Keqin and Liu, Xuejing and Wang, Jialin and Ge, Wenbin and Fan, Yang and Dang, Kai and Du, Mengfei and Ren, Xuancheng and Men, Rui and Liu, Dayiheng and Zhou, Chang and Zhou, Jingren and Lin, Junyang},
|
| 180 |
+
journal={arXiv preprint arXiv:2409.12191},
|
| 181 |
+
year={2024}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
@article{Qwen-VL,
|
| 185 |
+
title={Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyond},
|
| 186 |
+
author={Bai, Jinze and Bai, Shuai and Yang, Shusheng and Wang, Shijie and Tan, Sinan and Wang, Peng and Lin, Junyang and Zhou, Chang and Zhou, Jingren},
|
| 187 |
+
journal={arXiv preprint arXiv:2308.12966},
|
| 188 |
+
year={2023}
|
| 189 |
+
}
|
| 190 |
+
```
|
text_encoder/chat_template.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- for message in messages %}\n {%- if message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content_item in message.content %}\n {%- if 'text' in content_item %}\n {{- content_item.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and message.content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n"
|
| 3 |
+
}
|
| 4 |
+
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"image_token_id": 151655,
|
| 6 |
+
"model_type": "qwen3_vl",
|
| 7 |
+
"text_config": {
|
| 8 |
+
"attention_bias": false,
|
| 9 |
+
"attention_dropout": 0.0,
|
| 10 |
+
"bos_token_id": 151643,
|
| 11 |
+
"dtype": "bfloat16",
|
| 12 |
+
"eos_token_id": 151645,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "silu",
|
| 15 |
+
"hidden_size": 2560,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 9728,
|
| 18 |
+
"max_position_embeddings": 262144,
|
| 19 |
+
"model_type": "qwen3_vl_text",
|
| 20 |
+
"num_attention_heads": 32,
|
| 21 |
+
"num_hidden_layers": 36,
|
| 22 |
+
"num_key_value_heads": 8,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_scaling": {
|
| 25 |
+
"mrope_interleaved": true,
|
| 26 |
+
"mrope_section": [
|
| 27 |
+
24,
|
| 28 |
+
20,
|
| 29 |
+
20
|
| 30 |
+
],
|
| 31 |
+
"rope_type": "default"
|
| 32 |
+
},
|
| 33 |
+
"rope_theta": 5000000,
|
| 34 |
+
"tie_word_embeddings": true,
|
| 35 |
+
"use_cache": true,
|
| 36 |
+
"vocab_size": 151936
|
| 37 |
+
},
|
| 38 |
+
"tie_word_embeddings": true,
|
| 39 |
+
"transformers_version": "4.57.0.dev0",
|
| 40 |
+
"video_token_id": 151656,
|
| 41 |
+
"vision_config": {
|
| 42 |
+
"deepstack_visual_indexes": [
|
| 43 |
+
5,
|
| 44 |
+
11,
|
| 45 |
+
17
|
| 46 |
+
],
|
| 47 |
+
"depth": 24,
|
| 48 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 49 |
+
"hidden_size": 1024,
|
| 50 |
+
"in_channels": 3,
|
| 51 |
+
"initializer_range": 0.02,
|
| 52 |
+
"intermediate_size": 4096,
|
| 53 |
+
"model_type": "qwen3_vl",
|
| 54 |
+
"num_heads": 16,
|
| 55 |
+
"num_position_embeddings": 2304,
|
| 56 |
+
"out_hidden_size": 2560,
|
| 57 |
+
"patch_size": 16,
|
| 58 |
+
"spatial_merge_size": 2,
|
| 59 |
+
"temporal_patch_size": 2
|
| 60 |
+
},
|
| 61 |
+
"vision_end_token_id": 151653,
|
| 62 |
+
"vision_start_token_id": 151652
|
| 63 |
+
}
|
text_encoder/configuration.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
text_encoder/generation_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"pad_token_id": 151643,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151645,
|
| 7 |
+
151643
|
| 8 |
+
],
|
| 9 |
+
"top_k": 20,
|
| 10 |
+
"top_p": 0.8,
|
| 11 |
+
"repetition_penalty": 1.0,
|
| 12 |
+
"temperature": 0.7,
|
| 13 |
+
"transformers_version": "4.56.0"
|
| 14 |
+
}
|
text_encoder/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
text_encoder/model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30a01a0556622645a3cce87b655bbbbbc1f170c196099f1b666c93202c3339a9
|
| 3 |
+
size 4967229296
|
text_encoder/model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:046296a2a387efb43b0c997d5833c789604d168834f6e0d3064bf7bb13d002a6
|
| 3 |
+
size 3908490048
|
text_encoder/model.safetensors.index.json
ADDED
|
@@ -0,0 +1,720 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 8875631616
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"model.language_model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
| 7 |
+
"model.language_model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 8 |
+
"model.language_model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 9 |
+
"model.language_model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 10 |
+
"model.language_model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 11 |
+
"model.language_model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 12 |
+
"model.language_model.layers.0.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 13 |
+
"model.language_model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 14 |
+
"model.language_model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 15 |
+
"model.language_model.layers.0.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 16 |
+
"model.language_model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 17 |
+
"model.language_model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 18 |
+
"model.language_model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 19 |
+
"model.language_model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 20 |
+
"model.language_model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 21 |
+
"model.language_model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 22 |
+
"model.language_model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 23 |
+
"model.language_model.layers.1.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 24 |
+
"model.language_model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 25 |
+
"model.language_model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 26 |
+
"model.language_model.layers.1.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 27 |
+
"model.language_model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 28 |
+
"model.language_model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 29 |
+
"model.language_model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 30 |
+
"model.language_model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 31 |
+
"model.language_model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 32 |
+
"model.language_model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 33 |
+
"model.language_model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 34 |
+
"model.language_model.layers.10.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 35 |
+
"model.language_model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 36 |
+
"model.language_model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 37 |
+
"model.language_model.layers.10.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 38 |
+
"model.language_model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 39 |
+
"model.language_model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 40 |
+
"model.language_model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 41 |
+
"model.language_model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 42 |
+
"model.language_model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 43 |
+
"model.language_model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 44 |
+
"model.language_model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 45 |
+
"model.language_model.layers.11.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 46 |
+
"model.language_model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 47 |
+
"model.language_model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 48 |
+
"model.language_model.layers.11.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 49 |
+
"model.language_model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 50 |
+
"model.language_model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 51 |
+
"model.language_model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 52 |
+
"model.language_model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 53 |
+
"model.language_model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 54 |
+
"model.language_model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 55 |
+
"model.language_model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 56 |
+
"model.language_model.layers.12.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 57 |
+
"model.language_model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 58 |
+
"model.language_model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 59 |
+
"model.language_model.layers.12.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 60 |
+
"model.language_model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 61 |
+
"model.language_model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 62 |
+
"model.language_model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 63 |
+
"model.language_model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 64 |
+
"model.language_model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 65 |
+
"model.language_model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 66 |
+
"model.language_model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 67 |
+
"model.language_model.layers.13.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 68 |
+
"model.language_model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 69 |
+
"model.language_model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 70 |
+
"model.language_model.layers.13.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 71 |
+
"model.language_model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 72 |
+
"model.language_model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 73 |
+
"model.language_model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 74 |
+
"model.language_model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 75 |
+
"model.language_model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 76 |
+
"model.language_model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 77 |
+
"model.language_model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 78 |
+
"model.language_model.layers.14.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 79 |
+
"model.language_model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 80 |
+
"model.language_model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 81 |
+
"model.language_model.layers.14.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 82 |
+
"model.language_model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 83 |
+
"model.language_model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 84 |
+
"model.language_model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 85 |
+
"model.language_model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 86 |
+
"model.language_model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 87 |
+
"model.language_model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 88 |
+
"model.language_model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 89 |
+
"model.language_model.layers.15.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 90 |
+
"model.language_model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 91 |
+
"model.language_model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 92 |
+
"model.language_model.layers.15.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 93 |
+
"model.language_model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 94 |
+
"model.language_model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 95 |
+
"model.language_model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 96 |
+
"model.language_model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 97 |
+
"model.language_model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 98 |
+
"model.language_model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 99 |
+
"model.language_model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 100 |
+
"model.language_model.layers.16.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 101 |
+
"model.language_model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 102 |
+
"model.language_model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 103 |
+
"model.language_model.layers.16.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 104 |
+
"model.language_model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 105 |
+
"model.language_model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 106 |
+
"model.language_model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 107 |
+
"model.language_model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 108 |
+
"model.language_model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 109 |
+
"model.language_model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 110 |
+
"model.language_model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 111 |
+
"model.language_model.layers.17.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 112 |
+
"model.language_model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 113 |
+
"model.language_model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 114 |
+
"model.language_model.layers.17.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 115 |
+
"model.language_model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 116 |
+
"model.language_model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 117 |
+
"model.language_model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 118 |
+
"model.language_model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 119 |
+
"model.language_model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 120 |
+
"model.language_model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 121 |
+
"model.language_model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 122 |
+
"model.language_model.layers.18.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 123 |
+
"model.language_model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 124 |
+
"model.language_model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 125 |
+
"model.language_model.layers.18.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 126 |
+
"model.language_model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 127 |
+
"model.language_model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 128 |
+
"model.language_model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 129 |
+
"model.language_model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 130 |
+
"model.language_model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 131 |
+
"model.language_model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 132 |
+
"model.language_model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 133 |
+
"model.language_model.layers.19.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 134 |
+
"model.language_model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 135 |
+
"model.language_model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 136 |
+
"model.language_model.layers.19.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 137 |
+
"model.language_model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 138 |
+
"model.language_model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 139 |
+
"model.language_model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 140 |
+
"model.language_model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 141 |
+
"model.language_model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 142 |
+
"model.language_model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 143 |
+
"model.language_model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 144 |
+
"model.language_model.layers.2.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 145 |
+
"model.language_model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 146 |
+
"model.language_model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 147 |
+
"model.language_model.layers.2.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 148 |
+
"model.language_model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 149 |
+
"model.language_model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 150 |
+
"model.language_model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 151 |
+
"model.language_model.layers.20.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 152 |
+
"model.language_model.layers.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 153 |
+
"model.language_model.layers.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 154 |
+
"model.language_model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 155 |
+
"model.language_model.layers.20.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 156 |
+
"model.language_model.layers.20.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 157 |
+
"model.language_model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 158 |
+
"model.language_model.layers.20.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 159 |
+
"model.language_model.layers.20.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 160 |
+
"model.language_model.layers.20.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 161 |
+
"model.language_model.layers.21.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 162 |
+
"model.language_model.layers.21.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 163 |
+
"model.language_model.layers.21.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 164 |
+
"model.language_model.layers.21.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 165 |
+
"model.language_model.layers.21.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 166 |
+
"model.language_model.layers.21.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 167 |
+
"model.language_model.layers.21.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 168 |
+
"model.language_model.layers.21.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 169 |
+
"model.language_model.layers.21.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 170 |
+
"model.language_model.layers.21.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 171 |
+
"model.language_model.layers.21.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 172 |
+
"model.language_model.layers.22.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 173 |
+
"model.language_model.layers.22.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 174 |
+
"model.language_model.layers.22.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 175 |
+
"model.language_model.layers.22.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 176 |
+
"model.language_model.layers.22.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 177 |
+
"model.language_model.layers.22.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 178 |
+
"model.language_model.layers.22.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 179 |
+
"model.language_model.layers.22.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 180 |
+
"model.language_model.layers.22.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 181 |
+
"model.language_model.layers.22.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 182 |
+
"model.language_model.layers.22.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 183 |
+
"model.language_model.layers.23.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 184 |
+
"model.language_model.layers.23.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 185 |
+
"model.language_model.layers.23.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 186 |
+
"model.language_model.layers.23.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 187 |
+
"model.language_model.layers.23.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 188 |
+
"model.language_model.layers.23.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 189 |
+
"model.language_model.layers.23.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 190 |
+
"model.language_model.layers.23.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 191 |
+
"model.language_model.layers.23.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 192 |
+
"model.language_model.layers.23.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 193 |
+
"model.language_model.layers.23.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 194 |
+
"model.language_model.layers.24.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 195 |
+
"model.language_model.layers.24.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 196 |
+
"model.language_model.layers.24.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 197 |
+
"model.language_model.layers.24.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 198 |
+
"model.language_model.layers.24.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 199 |
+
"model.language_model.layers.24.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 200 |
+
"model.language_model.layers.24.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 201 |
+
"model.language_model.layers.24.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 202 |
+
"model.language_model.layers.24.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 203 |
+
"model.language_model.layers.24.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 204 |
+
"model.language_model.layers.24.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 205 |
+
"model.language_model.layers.25.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 206 |
+
"model.language_model.layers.25.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 207 |
+
"model.language_model.layers.25.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 208 |
+
"model.language_model.layers.25.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 209 |
+
"model.language_model.layers.25.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 210 |
+
"model.language_model.layers.25.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 211 |
+
"model.language_model.layers.25.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 212 |
+
"model.language_model.layers.25.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 213 |
+
"model.language_model.layers.25.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 214 |
+
"model.language_model.layers.25.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 215 |
+
"model.language_model.layers.25.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 216 |
+
"model.language_model.layers.26.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 217 |
+
"model.language_model.layers.26.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 218 |
+
"model.language_model.layers.26.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 219 |
+
"model.language_model.layers.26.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 220 |
+
"model.language_model.layers.26.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 221 |
+
"model.language_model.layers.26.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 222 |
+
"model.language_model.layers.26.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 223 |
+
"model.language_model.layers.26.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 224 |
+
"model.language_model.layers.26.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 225 |
+
"model.language_model.layers.26.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 226 |
+
"model.language_model.layers.26.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 227 |
+
"model.language_model.layers.27.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 228 |
+
"model.language_model.layers.27.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 229 |
+
"model.language_model.layers.27.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 230 |
+
"model.language_model.layers.27.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 231 |
+
"model.language_model.layers.27.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 232 |
+
"model.language_model.layers.27.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 233 |
+
"model.language_model.layers.27.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 234 |
+
"model.language_model.layers.27.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 235 |
+
"model.language_model.layers.27.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 236 |
+
"model.language_model.layers.27.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 237 |
+
"model.language_model.layers.27.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 238 |
+
"model.language_model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 239 |
+
"model.language_model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 240 |
+
"model.language_model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 241 |
+
"model.language_model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 242 |
+
"model.language_model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 243 |
+
"model.language_model.layers.28.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 244 |
+
"model.language_model.layers.28.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 245 |
+
"model.language_model.layers.28.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 246 |
+
"model.language_model.layers.28.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 247 |
+
"model.language_model.layers.28.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 248 |
+
"model.language_model.layers.28.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 249 |
+
"model.language_model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 250 |
+
"model.language_model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 251 |
+
"model.language_model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 252 |
+
"model.language_model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 253 |
+
"model.language_model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 254 |
+
"model.language_model.layers.29.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 255 |
+
"model.language_model.layers.29.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 256 |
+
"model.language_model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 257 |
+
"model.language_model.layers.29.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 258 |
+
"model.language_model.layers.29.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 259 |
+
"model.language_model.layers.29.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 260 |
+
"model.language_model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 261 |
+
"model.language_model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 262 |
+
"model.language_model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 263 |
+
"model.language_model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 264 |
+
"model.language_model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 265 |
+
"model.language_model.layers.3.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 266 |
+
"model.language_model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 267 |
+
"model.language_model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 268 |
+
"model.language_model.layers.3.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 269 |
+
"model.language_model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 270 |
+
"model.language_model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 271 |
+
"model.language_model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 272 |
+
"model.language_model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 273 |
+
"model.language_model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 274 |
+
"model.language_model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 275 |
+
"model.language_model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 276 |
+
"model.language_model.layers.30.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 277 |
+
"model.language_model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 278 |
+
"model.language_model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 279 |
+
"model.language_model.layers.30.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 280 |
+
"model.language_model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 281 |
+
"model.language_model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 282 |
+
"model.language_model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 283 |
+
"model.language_model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 284 |
+
"model.language_model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 285 |
+
"model.language_model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 286 |
+
"model.language_model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 287 |
+
"model.language_model.layers.31.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 288 |
+
"model.language_model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 289 |
+
"model.language_model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 290 |
+
"model.language_model.layers.31.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 291 |
+
"model.language_model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 292 |
+
"model.language_model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 293 |
+
"model.language_model.layers.32.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 294 |
+
"model.language_model.layers.32.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 295 |
+
"model.language_model.layers.32.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 296 |
+
"model.language_model.layers.32.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 297 |
+
"model.language_model.layers.32.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 298 |
+
"model.language_model.layers.32.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 299 |
+
"model.language_model.layers.32.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 300 |
+
"model.language_model.layers.32.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 301 |
+
"model.language_model.layers.32.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 302 |
+
"model.language_model.layers.32.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 303 |
+
"model.language_model.layers.32.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 304 |
+
"model.language_model.layers.33.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 305 |
+
"model.language_model.layers.33.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 306 |
+
"model.language_model.layers.33.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 307 |
+
"model.language_model.layers.33.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 308 |
+
"model.language_model.layers.33.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 309 |
+
"model.language_model.layers.33.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 310 |
+
"model.language_model.layers.33.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 311 |
+
"model.language_model.layers.33.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 312 |
+
"model.language_model.layers.33.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 313 |
+
"model.language_model.layers.33.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 314 |
+
"model.language_model.layers.33.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 315 |
+
"model.language_model.layers.34.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 316 |
+
"model.language_model.layers.34.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 317 |
+
"model.language_model.layers.34.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 318 |
+
"model.language_model.layers.34.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 319 |
+
"model.language_model.layers.34.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 320 |
+
"model.language_model.layers.34.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 321 |
+
"model.language_model.layers.34.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 322 |
+
"model.language_model.layers.34.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 323 |
+
"model.language_model.layers.34.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 324 |
+
"model.language_model.layers.34.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 325 |
+
"model.language_model.layers.34.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 326 |
+
"model.language_model.layers.35.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 327 |
+
"model.language_model.layers.35.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 328 |
+
"model.language_model.layers.35.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 329 |
+
"model.language_model.layers.35.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 330 |
+
"model.language_model.layers.35.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 331 |
+
"model.language_model.layers.35.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 332 |
+
"model.language_model.layers.35.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 333 |
+
"model.language_model.layers.35.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 334 |
+
"model.language_model.layers.35.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 335 |
+
"model.language_model.layers.35.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 336 |
+
"model.language_model.layers.35.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 337 |
+
"model.language_model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 338 |
+
"model.language_model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 339 |
+
"model.language_model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 340 |
+
"model.language_model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 341 |
+
"model.language_model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 342 |
+
"model.language_model.layers.4.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 343 |
+
"model.language_model.layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 344 |
+
"model.language_model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 345 |
+
"model.language_model.layers.4.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 346 |
+
"model.language_model.layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 347 |
+
"model.language_model.layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 348 |
+
"model.language_model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 349 |
+
"model.language_model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 350 |
+
"model.language_model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 351 |
+
"model.language_model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 352 |
+
"model.language_model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 353 |
+
"model.language_model.layers.5.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 354 |
+
"model.language_model.layers.5.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 355 |
+
"model.language_model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 356 |
+
"model.language_model.layers.5.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 357 |
+
"model.language_model.layers.5.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 358 |
+
"model.language_model.layers.5.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 359 |
+
"model.language_model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 360 |
+
"model.language_model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 361 |
+
"model.language_model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 362 |
+
"model.language_model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 363 |
+
"model.language_model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 364 |
+
"model.language_model.layers.6.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 365 |
+
"model.language_model.layers.6.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 366 |
+
"model.language_model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 367 |
+
"model.language_model.layers.6.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 368 |
+
"model.language_model.layers.6.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 369 |
+
"model.language_model.layers.6.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 370 |
+
"model.language_model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 371 |
+
"model.language_model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 372 |
+
"model.language_model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 373 |
+
"model.language_model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 374 |
+
"model.language_model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 375 |
+
"model.language_model.layers.7.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 376 |
+
"model.language_model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 377 |
+
"model.language_model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 378 |
+
"model.language_model.layers.7.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 379 |
+
"model.language_model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 380 |
+
"model.language_model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 381 |
+
"model.language_model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 382 |
+
"model.language_model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 383 |
+
"model.language_model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 384 |
+
"model.language_model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 385 |
+
"model.language_model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 386 |
+
"model.language_model.layers.8.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 387 |
+
"model.language_model.layers.8.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 388 |
+
"model.language_model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 389 |
+
"model.language_model.layers.8.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 390 |
+
"model.language_model.layers.8.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 391 |
+
"model.language_model.layers.8.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 392 |
+
"model.language_model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 393 |
+
"model.language_model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 394 |
+
"model.language_model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 395 |
+
"model.language_model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 396 |
+
"model.language_model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 397 |
+
"model.language_model.layers.9.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 398 |
+
"model.language_model.layers.9.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 399 |
+
"model.language_model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 400 |
+
"model.language_model.layers.9.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 401 |
+
"model.language_model.layers.9.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 402 |
+
"model.language_model.layers.9.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 403 |
+
"model.language_model.norm.weight": "model-00002-of-00002.safetensors",
|
| 404 |
+
"model.visual.blocks.0.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 405 |
+
"model.visual.blocks.0.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 406 |
+
"model.visual.blocks.0.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 407 |
+
"model.visual.blocks.0.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 408 |
+
"model.visual.blocks.0.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 409 |
+
"model.visual.blocks.0.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 410 |
+
"model.visual.blocks.0.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 411 |
+
"model.visual.blocks.0.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 412 |
+
"model.visual.blocks.0.norm1.bias": "model-00002-of-00002.safetensors",
|
| 413 |
+
"model.visual.blocks.0.norm1.weight": "model-00002-of-00002.safetensors",
|
| 414 |
+
"model.visual.blocks.0.norm2.bias": "model-00002-of-00002.safetensors",
|
| 415 |
+
"model.visual.blocks.0.norm2.weight": "model-00002-of-00002.safetensors",
|
| 416 |
+
"model.visual.blocks.1.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 417 |
+
"model.visual.blocks.1.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 418 |
+
"model.visual.blocks.1.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 419 |
+
"model.visual.blocks.1.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 420 |
+
"model.visual.blocks.1.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 421 |
+
"model.visual.blocks.1.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 422 |
+
"model.visual.blocks.1.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 423 |
+
"model.visual.blocks.1.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 424 |
+
"model.visual.blocks.1.norm1.bias": "model-00002-of-00002.safetensors",
|
| 425 |
+
"model.visual.blocks.1.norm1.weight": "model-00002-of-00002.safetensors",
|
| 426 |
+
"model.visual.blocks.1.norm2.bias": "model-00002-of-00002.safetensors",
|
| 427 |
+
"model.visual.blocks.1.norm2.weight": "model-00002-of-00002.safetensors",
|
| 428 |
+
"model.visual.blocks.10.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 429 |
+
"model.visual.blocks.10.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 430 |
+
"model.visual.blocks.10.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 431 |
+
"model.visual.blocks.10.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 432 |
+
"model.visual.blocks.10.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 433 |
+
"model.visual.blocks.10.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 434 |
+
"model.visual.blocks.10.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 435 |
+
"model.visual.blocks.10.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 436 |
+
"model.visual.blocks.10.norm1.bias": "model-00002-of-00002.safetensors",
|
| 437 |
+
"model.visual.blocks.10.norm1.weight": "model-00002-of-00002.safetensors",
|
| 438 |
+
"model.visual.blocks.10.norm2.bias": "model-00002-of-00002.safetensors",
|
| 439 |
+
"model.visual.blocks.10.norm2.weight": "model-00002-of-00002.safetensors",
|
| 440 |
+
"model.visual.blocks.11.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 441 |
+
"model.visual.blocks.11.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 442 |
+
"model.visual.blocks.11.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 443 |
+
"model.visual.blocks.11.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 444 |
+
"model.visual.blocks.11.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 445 |
+
"model.visual.blocks.11.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 446 |
+
"model.visual.blocks.11.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 447 |
+
"model.visual.blocks.11.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 448 |
+
"model.visual.blocks.11.norm1.bias": "model-00002-of-00002.safetensors",
|
| 449 |
+
"model.visual.blocks.11.norm1.weight": "model-00002-of-00002.safetensors",
|
| 450 |
+
"model.visual.blocks.11.norm2.bias": "model-00002-of-00002.safetensors",
|
| 451 |
+
"model.visual.blocks.11.norm2.weight": "model-00002-of-00002.safetensors",
|
| 452 |
+
"model.visual.blocks.12.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 453 |
+
"model.visual.blocks.12.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 454 |
+
"model.visual.blocks.12.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 455 |
+
"model.visual.blocks.12.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 456 |
+
"model.visual.blocks.12.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 457 |
+
"model.visual.blocks.12.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 458 |
+
"model.visual.blocks.12.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 459 |
+
"model.visual.blocks.12.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 460 |
+
"model.visual.blocks.12.norm1.bias": "model-00002-of-00002.safetensors",
|
| 461 |
+
"model.visual.blocks.12.norm1.weight": "model-00002-of-00002.safetensors",
|
| 462 |
+
"model.visual.blocks.12.norm2.bias": "model-00002-of-00002.safetensors",
|
| 463 |
+
"model.visual.blocks.12.norm2.weight": "model-00002-of-00002.safetensors",
|
| 464 |
+
"model.visual.blocks.13.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 465 |
+
"model.visual.blocks.13.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 466 |
+
"model.visual.blocks.13.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 467 |
+
"model.visual.blocks.13.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 468 |
+
"model.visual.blocks.13.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 469 |
+
"model.visual.blocks.13.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 470 |
+
"model.visual.blocks.13.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 471 |
+
"model.visual.blocks.13.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 472 |
+
"model.visual.blocks.13.norm1.bias": "model-00002-of-00002.safetensors",
|
| 473 |
+
"model.visual.blocks.13.norm1.weight": "model-00002-of-00002.safetensors",
|
| 474 |
+
"model.visual.blocks.13.norm2.bias": "model-00002-of-00002.safetensors",
|
| 475 |
+
"model.visual.blocks.13.norm2.weight": "model-00002-of-00002.safetensors",
|
| 476 |
+
"model.visual.blocks.14.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 477 |
+
"model.visual.blocks.14.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 478 |
+
"model.visual.blocks.14.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 479 |
+
"model.visual.blocks.14.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 480 |
+
"model.visual.blocks.14.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 481 |
+
"model.visual.blocks.14.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 482 |
+
"model.visual.blocks.14.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 483 |
+
"model.visual.blocks.14.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 484 |
+
"model.visual.blocks.14.norm1.bias": "model-00002-of-00002.safetensors",
|
| 485 |
+
"model.visual.blocks.14.norm1.weight": "model-00002-of-00002.safetensors",
|
| 486 |
+
"model.visual.blocks.14.norm2.bias": "model-00002-of-00002.safetensors",
|
| 487 |
+
"model.visual.blocks.14.norm2.weight": "model-00002-of-00002.safetensors",
|
| 488 |
+
"model.visual.blocks.15.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 489 |
+
"model.visual.blocks.15.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 490 |
+
"model.visual.blocks.15.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 491 |
+
"model.visual.blocks.15.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 492 |
+
"model.visual.blocks.15.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 493 |
+
"model.visual.blocks.15.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 494 |
+
"model.visual.blocks.15.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 495 |
+
"model.visual.blocks.15.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 496 |
+
"model.visual.blocks.15.norm1.bias": "model-00002-of-00002.safetensors",
|
| 497 |
+
"model.visual.blocks.15.norm1.weight": "model-00002-of-00002.safetensors",
|
| 498 |
+
"model.visual.blocks.15.norm2.bias": "model-00002-of-00002.safetensors",
|
| 499 |
+
"model.visual.blocks.15.norm2.weight": "model-00002-of-00002.safetensors",
|
| 500 |
+
"model.visual.blocks.16.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 501 |
+
"model.visual.blocks.16.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 502 |
+
"model.visual.blocks.16.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 503 |
+
"model.visual.blocks.16.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 504 |
+
"model.visual.blocks.16.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 505 |
+
"model.visual.blocks.16.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 506 |
+
"model.visual.blocks.16.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 507 |
+
"model.visual.blocks.16.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 508 |
+
"model.visual.blocks.16.norm1.bias": "model-00002-of-00002.safetensors",
|
| 509 |
+
"model.visual.blocks.16.norm1.weight": "model-00002-of-00002.safetensors",
|
| 510 |
+
"model.visual.blocks.16.norm2.bias": "model-00002-of-00002.safetensors",
|
| 511 |
+
"model.visual.blocks.16.norm2.weight": "model-00002-of-00002.safetensors",
|
| 512 |
+
"model.visual.blocks.17.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 513 |
+
"model.visual.blocks.17.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 514 |
+
"model.visual.blocks.17.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 515 |
+
"model.visual.blocks.17.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 516 |
+
"model.visual.blocks.17.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 517 |
+
"model.visual.blocks.17.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 518 |
+
"model.visual.blocks.17.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 519 |
+
"model.visual.blocks.17.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 520 |
+
"model.visual.blocks.17.norm1.bias": "model-00002-of-00002.safetensors",
|
| 521 |
+
"model.visual.blocks.17.norm1.weight": "model-00002-of-00002.safetensors",
|
| 522 |
+
"model.visual.blocks.17.norm2.bias": "model-00002-of-00002.safetensors",
|
| 523 |
+
"model.visual.blocks.17.norm2.weight": "model-00002-of-00002.safetensors",
|
| 524 |
+
"model.visual.blocks.18.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 525 |
+
"model.visual.blocks.18.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 526 |
+
"model.visual.blocks.18.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 527 |
+
"model.visual.blocks.18.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 528 |
+
"model.visual.blocks.18.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 529 |
+
"model.visual.blocks.18.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 530 |
+
"model.visual.blocks.18.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 531 |
+
"model.visual.blocks.18.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 532 |
+
"model.visual.blocks.18.norm1.bias": "model-00002-of-00002.safetensors",
|
| 533 |
+
"model.visual.blocks.18.norm1.weight": "model-00002-of-00002.safetensors",
|
| 534 |
+
"model.visual.blocks.18.norm2.bias": "model-00002-of-00002.safetensors",
|
| 535 |
+
"model.visual.blocks.18.norm2.weight": "model-00002-of-00002.safetensors",
|
| 536 |
+
"model.visual.blocks.19.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 537 |
+
"model.visual.blocks.19.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 538 |
+
"model.visual.blocks.19.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 539 |
+
"model.visual.blocks.19.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 540 |
+
"model.visual.blocks.19.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 541 |
+
"model.visual.blocks.19.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 542 |
+
"model.visual.blocks.19.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 543 |
+
"model.visual.blocks.19.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 544 |
+
"model.visual.blocks.19.norm1.bias": "model-00002-of-00002.safetensors",
|
| 545 |
+
"model.visual.blocks.19.norm1.weight": "model-00002-of-00002.safetensors",
|
| 546 |
+
"model.visual.blocks.19.norm2.bias": "model-00002-of-00002.safetensors",
|
| 547 |
+
"model.visual.blocks.19.norm2.weight": "model-00002-of-00002.safetensors",
|
| 548 |
+
"model.visual.blocks.2.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 549 |
+
"model.visual.blocks.2.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 550 |
+
"model.visual.blocks.2.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 551 |
+
"model.visual.blocks.2.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 552 |
+
"model.visual.blocks.2.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 553 |
+
"model.visual.blocks.2.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 554 |
+
"model.visual.blocks.2.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 555 |
+
"model.visual.blocks.2.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 556 |
+
"model.visual.blocks.2.norm1.bias": "model-00002-of-00002.safetensors",
|
| 557 |
+
"model.visual.blocks.2.norm1.weight": "model-00002-of-00002.safetensors",
|
| 558 |
+
"model.visual.blocks.2.norm2.bias": "model-00002-of-00002.safetensors",
|
| 559 |
+
"model.visual.blocks.2.norm2.weight": "model-00002-of-00002.safetensors",
|
| 560 |
+
"model.visual.blocks.20.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 561 |
+
"model.visual.blocks.20.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 562 |
+
"model.visual.blocks.20.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 563 |
+
"model.visual.blocks.20.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 564 |
+
"model.visual.blocks.20.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 565 |
+
"model.visual.blocks.20.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 566 |
+
"model.visual.blocks.20.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 567 |
+
"model.visual.blocks.20.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 568 |
+
"model.visual.blocks.20.norm1.bias": "model-00002-of-00002.safetensors",
|
| 569 |
+
"model.visual.blocks.20.norm1.weight": "model-00002-of-00002.safetensors",
|
| 570 |
+
"model.visual.blocks.20.norm2.bias": "model-00002-of-00002.safetensors",
|
| 571 |
+
"model.visual.blocks.20.norm2.weight": "model-00002-of-00002.safetensors",
|
| 572 |
+
"model.visual.blocks.21.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 573 |
+
"model.visual.blocks.21.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 574 |
+
"model.visual.blocks.21.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 575 |
+
"model.visual.blocks.21.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 576 |
+
"model.visual.blocks.21.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 577 |
+
"model.visual.blocks.21.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 578 |
+
"model.visual.blocks.21.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 579 |
+
"model.visual.blocks.21.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 580 |
+
"model.visual.blocks.21.norm1.bias": "model-00002-of-00002.safetensors",
|
| 581 |
+
"model.visual.blocks.21.norm1.weight": "model-00002-of-00002.safetensors",
|
| 582 |
+
"model.visual.blocks.21.norm2.bias": "model-00002-of-00002.safetensors",
|
| 583 |
+
"model.visual.blocks.21.norm2.weight": "model-00002-of-00002.safetensors",
|
| 584 |
+
"model.visual.blocks.22.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 585 |
+
"model.visual.blocks.22.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 586 |
+
"model.visual.blocks.22.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 587 |
+
"model.visual.blocks.22.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 588 |
+
"model.visual.blocks.22.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 589 |
+
"model.visual.blocks.22.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 590 |
+
"model.visual.blocks.22.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 591 |
+
"model.visual.blocks.22.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 592 |
+
"model.visual.blocks.22.norm1.bias": "model-00002-of-00002.safetensors",
|
| 593 |
+
"model.visual.blocks.22.norm1.weight": "model-00002-of-00002.safetensors",
|
| 594 |
+
"model.visual.blocks.22.norm2.bias": "model-00002-of-00002.safetensors",
|
| 595 |
+
"model.visual.blocks.22.norm2.weight": "model-00002-of-00002.safetensors",
|
| 596 |
+
"model.visual.blocks.23.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 597 |
+
"model.visual.blocks.23.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 598 |
+
"model.visual.blocks.23.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 599 |
+
"model.visual.blocks.23.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 600 |
+
"model.visual.blocks.23.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 601 |
+
"model.visual.blocks.23.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 602 |
+
"model.visual.blocks.23.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 603 |
+
"model.visual.blocks.23.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 604 |
+
"model.visual.blocks.23.norm1.bias": "model-00002-of-00002.safetensors",
|
| 605 |
+
"model.visual.blocks.23.norm1.weight": "model-00002-of-00002.safetensors",
|
| 606 |
+
"model.visual.blocks.23.norm2.bias": "model-00002-of-00002.safetensors",
|
| 607 |
+
"model.visual.blocks.23.norm2.weight": "model-00002-of-00002.safetensors",
|
| 608 |
+
"model.visual.blocks.3.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 609 |
+
"model.visual.blocks.3.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 610 |
+
"model.visual.blocks.3.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 611 |
+
"model.visual.blocks.3.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 612 |
+
"model.visual.blocks.3.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 613 |
+
"model.visual.blocks.3.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 614 |
+
"model.visual.blocks.3.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 615 |
+
"model.visual.blocks.3.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 616 |
+
"model.visual.blocks.3.norm1.bias": "model-00002-of-00002.safetensors",
|
| 617 |
+
"model.visual.blocks.3.norm1.weight": "model-00002-of-00002.safetensors",
|
| 618 |
+
"model.visual.blocks.3.norm2.bias": "model-00002-of-00002.safetensors",
|
| 619 |
+
"model.visual.blocks.3.norm2.weight": "model-00002-of-00002.safetensors",
|
| 620 |
+
"model.visual.blocks.4.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 621 |
+
"model.visual.blocks.4.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 622 |
+
"model.visual.blocks.4.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 623 |
+
"model.visual.blocks.4.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 624 |
+
"model.visual.blocks.4.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 625 |
+
"model.visual.blocks.4.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 626 |
+
"model.visual.blocks.4.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 627 |
+
"model.visual.blocks.4.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 628 |
+
"model.visual.blocks.4.norm1.bias": "model-00002-of-00002.safetensors",
|
| 629 |
+
"model.visual.blocks.4.norm1.weight": "model-00002-of-00002.safetensors",
|
| 630 |
+
"model.visual.blocks.4.norm2.bias": "model-00002-of-00002.safetensors",
|
| 631 |
+
"model.visual.blocks.4.norm2.weight": "model-00002-of-00002.safetensors",
|
| 632 |
+
"model.visual.blocks.5.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 633 |
+
"model.visual.blocks.5.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 634 |
+
"model.visual.blocks.5.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 635 |
+
"model.visual.blocks.5.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 636 |
+
"model.visual.blocks.5.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 637 |
+
"model.visual.blocks.5.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 638 |
+
"model.visual.blocks.5.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 639 |
+
"model.visual.blocks.5.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 640 |
+
"model.visual.blocks.5.norm1.bias": "model-00002-of-00002.safetensors",
|
| 641 |
+
"model.visual.blocks.5.norm1.weight": "model-00002-of-00002.safetensors",
|
| 642 |
+
"model.visual.blocks.5.norm2.bias": "model-00002-of-00002.safetensors",
|
| 643 |
+
"model.visual.blocks.5.norm2.weight": "model-00002-of-00002.safetensors",
|
| 644 |
+
"model.visual.blocks.6.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 645 |
+
"model.visual.blocks.6.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 646 |
+
"model.visual.blocks.6.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 647 |
+
"model.visual.blocks.6.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 648 |
+
"model.visual.blocks.6.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 649 |
+
"model.visual.blocks.6.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 650 |
+
"model.visual.blocks.6.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 651 |
+
"model.visual.blocks.6.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 652 |
+
"model.visual.blocks.6.norm1.bias": "model-00002-of-00002.safetensors",
|
| 653 |
+
"model.visual.blocks.6.norm1.weight": "model-00002-of-00002.safetensors",
|
| 654 |
+
"model.visual.blocks.6.norm2.bias": "model-00002-of-00002.safetensors",
|
| 655 |
+
"model.visual.blocks.6.norm2.weight": "model-00002-of-00002.safetensors",
|
| 656 |
+
"model.visual.blocks.7.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 657 |
+
"model.visual.blocks.7.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 658 |
+
"model.visual.blocks.7.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 659 |
+
"model.visual.blocks.7.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 660 |
+
"model.visual.blocks.7.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 661 |
+
"model.visual.blocks.7.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 662 |
+
"model.visual.blocks.7.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 663 |
+
"model.visual.blocks.7.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 664 |
+
"model.visual.blocks.7.norm1.bias": "model-00002-of-00002.safetensors",
|
| 665 |
+
"model.visual.blocks.7.norm1.weight": "model-00002-of-00002.safetensors",
|
| 666 |
+
"model.visual.blocks.7.norm2.bias": "model-00002-of-00002.safetensors",
|
| 667 |
+
"model.visual.blocks.7.norm2.weight": "model-00002-of-00002.safetensors",
|
| 668 |
+
"model.visual.blocks.8.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 669 |
+
"model.visual.blocks.8.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 670 |
+
"model.visual.blocks.8.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 671 |
+
"model.visual.blocks.8.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 672 |
+
"model.visual.blocks.8.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 673 |
+
"model.visual.blocks.8.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 674 |
+
"model.visual.blocks.8.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 675 |
+
"model.visual.blocks.8.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 676 |
+
"model.visual.blocks.8.norm1.bias": "model-00002-of-00002.safetensors",
|
| 677 |
+
"model.visual.blocks.8.norm1.weight": "model-00002-of-00002.safetensors",
|
| 678 |
+
"model.visual.blocks.8.norm2.bias": "model-00002-of-00002.safetensors",
|
| 679 |
+
"model.visual.blocks.8.norm2.weight": "model-00002-of-00002.safetensors",
|
| 680 |
+
"model.visual.blocks.9.attn.proj.bias": "model-00002-of-00002.safetensors",
|
| 681 |
+
"model.visual.blocks.9.attn.proj.weight": "model-00002-of-00002.safetensors",
|
| 682 |
+
"model.visual.blocks.9.attn.qkv.bias": "model-00002-of-00002.safetensors",
|
| 683 |
+
"model.visual.blocks.9.attn.qkv.weight": "model-00002-of-00002.safetensors",
|
| 684 |
+
"model.visual.blocks.9.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 685 |
+
"model.visual.blocks.9.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 686 |
+
"model.visual.blocks.9.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 687 |
+
"model.visual.blocks.9.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 688 |
+
"model.visual.blocks.9.norm1.bias": "model-00002-of-00002.safetensors",
|
| 689 |
+
"model.visual.blocks.9.norm1.weight": "model-00002-of-00002.safetensors",
|
| 690 |
+
"model.visual.blocks.9.norm2.bias": "model-00002-of-00002.safetensors",
|
| 691 |
+
"model.visual.blocks.9.norm2.weight": "model-00002-of-00002.safetensors",
|
| 692 |
+
"model.visual.deepstack_merger_list.0.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 693 |
+
"model.visual.deepstack_merger_list.0.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 694 |
+
"model.visual.deepstack_merger_list.0.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 695 |
+
"model.visual.deepstack_merger_list.0.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 696 |
+
"model.visual.deepstack_merger_list.0.norm.bias": "model-00002-of-00002.safetensors",
|
| 697 |
+
"model.visual.deepstack_merger_list.0.norm.weight": "model-00002-of-00002.safetensors",
|
| 698 |
+
"model.visual.deepstack_merger_list.1.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 699 |
+
"model.visual.deepstack_merger_list.1.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 700 |
+
"model.visual.deepstack_merger_list.1.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 701 |
+
"model.visual.deepstack_merger_list.1.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 702 |
+
"model.visual.deepstack_merger_list.1.norm.bias": "model-00002-of-00002.safetensors",
|
| 703 |
+
"model.visual.deepstack_merger_list.1.norm.weight": "model-00002-of-00002.safetensors",
|
| 704 |
+
"model.visual.deepstack_merger_list.2.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 705 |
+
"model.visual.deepstack_merger_list.2.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 706 |
+
"model.visual.deepstack_merger_list.2.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 707 |
+
"model.visual.deepstack_merger_list.2.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 708 |
+
"model.visual.deepstack_merger_list.2.norm.bias": "model-00002-of-00002.safetensors",
|
| 709 |
+
"model.visual.deepstack_merger_list.2.norm.weight": "model-00002-of-00002.safetensors",
|
| 710 |
+
"model.visual.merger.linear_fc1.bias": "model-00002-of-00002.safetensors",
|
| 711 |
+
"model.visual.merger.linear_fc1.weight": "model-00002-of-00002.safetensors",
|
| 712 |
+
"model.visual.merger.linear_fc2.bias": "model-00002-of-00002.safetensors",
|
| 713 |
+
"model.visual.merger.linear_fc2.weight": "model-00002-of-00002.safetensors",
|
| 714 |
+
"model.visual.merger.norm.bias": "model-00002-of-00002.safetensors",
|
| 715 |
+
"model.visual.merger.norm.weight": "model-00002-of-00002.safetensors",
|
| 716 |
+
"model.visual.patch_embed.proj.bias": "model-00002-of-00002.safetensors",
|
| 717 |
+
"model.visual.patch_embed.proj.weight": "model-00002-of-00002.safetensors",
|
| 718 |
+
"model.visual.pos_embed.weight": "model-00002-of-00002.safetensors"
|
| 719 |
+
}
|
| 720 |
+
}
|
text_encoder/preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 16777216,
|
| 4 |
+
"shortest_edge": 65536
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"image_processor_type": "Qwen2VLImageProcessorFast"
|
| 21 |
+
}
|
text_encoder/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
text_encoder/tokenizer_config.json
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_prefix_space": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"151643": {
|
| 6 |
+
"content": "<|endoftext|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
},
|
| 181 |
+
"151665": {
|
| 182 |
+
"content": "<tool_response>",
|
| 183 |
+
"lstrip": false,
|
| 184 |
+
"normalized": false,
|
| 185 |
+
"rstrip": false,
|
| 186 |
+
"single_word": false,
|
| 187 |
+
"special": false
|
| 188 |
+
},
|
| 189 |
+
"151666": {
|
| 190 |
+
"content": "</tool_response>",
|
| 191 |
+
"lstrip": false,
|
| 192 |
+
"normalized": false,
|
| 193 |
+
"rstrip": false,
|
| 194 |
+
"single_word": false,
|
| 195 |
+
"special": false
|
| 196 |
+
},
|
| 197 |
+
"151667": {
|
| 198 |
+
"content": "<think>",
|
| 199 |
+
"lstrip": false,
|
| 200 |
+
"normalized": false,
|
| 201 |
+
"rstrip": false,
|
| 202 |
+
"single_word": false,
|
| 203 |
+
"special": false
|
| 204 |
+
},
|
| 205 |
+
"151668": {
|
| 206 |
+
"content": "</think>",
|
| 207 |
+
"lstrip": false,
|
| 208 |
+
"normalized": false,
|
| 209 |
+
"rstrip": false,
|
| 210 |
+
"single_word": false,
|
| 211 |
+
"special": false
|
| 212 |
+
}
|
| 213 |
+
},
|
| 214 |
+
"additional_special_tokens": [
|
| 215 |
+
"<|im_start|>",
|
| 216 |
+
"<|im_end|>",
|
| 217 |
+
"<|object_ref_start|>",
|
| 218 |
+
"<|object_ref_end|>",
|
| 219 |
+
"<|box_start|>",
|
| 220 |
+
"<|box_end|>",
|
| 221 |
+
"<|quad_start|>",
|
| 222 |
+
"<|quad_end|>",
|
| 223 |
+
"<|vision_start|>",
|
| 224 |
+
"<|vision_end|>",
|
| 225 |
+
"<|vision_pad|>",
|
| 226 |
+
"<|image_pad|>",
|
| 227 |
+
"<|video_pad|>"
|
| 228 |
+
],
|
| 229 |
+
"bos_token": null,
|
| 230 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].content is string %}\n {{- messages[0].content }}\n {%- else %}\n {%- for content in messages[0].content %}\n {%- if 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- for message in messages %}\n {%- if message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content_item in message.content %}\n {%- if 'text' in content_item %}\n {{- content_item.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and message.content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {%- if message.content is string %}\n {{- message.content }}\n {%- else %}\n {%- for content in message.content %}\n {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}\n <|vision_start|><|image_pad|><|vision_end|>\n {%- elif content.type == 'video' or 'video' in content %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}\n <|vision_start|><|video_pad|><|vision_end|>\n {%- elif 'text' in content %}\n {{- content.text }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 231 |
+
"clean_up_tokenization_spaces": false,
|
| 232 |
+
"eos_token": "<|im_end|>",
|
| 233 |
+
"errors": "replace",
|
| 234 |
+
"model_max_length": 262144,
|
| 235 |
+
"pad_token": "<|endoftext|>",
|
| 236 |
+
"split_special_tokens": false,
|
| 237 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 238 |
+
"unk_token": null
|
| 239 |
+
}
|
text_encoder/video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 25165824,
|
| 4 |
+
"shortest_edge": 4096
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 21 |
+
}
|
text_encoder/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vae/config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLWan",
|
| 3 |
+
"_diffusers_version": "0.33.0.dev0",
|
| 4 |
+
"attn_scales": [],
|
| 5 |
+
"base_dim": 96,
|
| 6 |
+
"dim_mult": [
|
| 7 |
+
1,
|
| 8 |
+
2,
|
| 9 |
+
4,
|
| 10 |
+
4
|
| 11 |
+
],
|
| 12 |
+
"dropout": 0.0,
|
| 13 |
+
"latents_mean": [
|
| 14 |
+
-0.7571,
|
| 15 |
+
-0.7089,
|
| 16 |
+
-0.9113,
|
| 17 |
+
0.1075,
|
| 18 |
+
-0.1745,
|
| 19 |
+
0.9653,
|
| 20 |
+
-0.1517,
|
| 21 |
+
1.5508,
|
| 22 |
+
0.4134,
|
| 23 |
+
-0.0715,
|
| 24 |
+
0.5517,
|
| 25 |
+
-0.3632,
|
| 26 |
+
-0.1922,
|
| 27 |
+
-0.9497,
|
| 28 |
+
0.2503,
|
| 29 |
+
-0.2921
|
| 30 |
+
],
|
| 31 |
+
"latents_std": [
|
| 32 |
+
2.8184,
|
| 33 |
+
1.4541,
|
| 34 |
+
2.3275,
|
| 35 |
+
2.6558,
|
| 36 |
+
1.2196,
|
| 37 |
+
1.7708,
|
| 38 |
+
2.6052,
|
| 39 |
+
2.0743,
|
| 40 |
+
3.2687,
|
| 41 |
+
2.1526,
|
| 42 |
+
2.8652,
|
| 43 |
+
1.5579,
|
| 44 |
+
1.6382,
|
| 45 |
+
1.1253,
|
| 46 |
+
2.8251,
|
| 47 |
+
1.916
|
| 48 |
+
],
|
| 49 |
+
"num_res_blocks": 2,
|
| 50 |
+
"temperal_downsample": [
|
| 51 |
+
false,
|
| 52 |
+
true,
|
| 53 |
+
true
|
| 54 |
+
],
|
| 55 |
+
"z_dim": 16
|
| 56 |
+
}
|