Text Generation
Transformers
Safetensors
English
Korean
qwen3_5
image-text-to-text
darwin
mfp4
mixed-precision
nvfp4
quantization
blackwell
reasoning
conversational
modelopt
Instructions to use FINAL-Bench/Darwin-9B-MFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FINAL-Bench/Darwin-9B-MFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FINAL-Bench/Darwin-9B-MFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("FINAL-Bench/Darwin-9B-MFP4") model = AutoModelForImageTextToText.from_pretrained("FINAL-Bench/Darwin-9B-MFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FINAL-Bench/Darwin-9B-MFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FINAL-Bench/Darwin-9B-MFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FINAL-Bench/Darwin-9B-MFP4
- SGLang
How to use FINAL-Bench/Darwin-9B-MFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "FINAL-Bench/Darwin-9B-MFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "FINAL-Bench/Darwin-9B-MFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FINAL-Bench/Darwin-9B-MFP4 with Docker Model Runner:
docker model run hf.co/FINAL-Bench/Darwin-9B-MFP4
Initial upload: Darwin-9B-MFP4 (Mixed FP4) — 60% on GPQA dev20, +10pp vs BF16
Browse files- .gitattributes +1 -0
- README.md +175 -0
- chat_template.jinja +154 -0
- config.json +237 -0
- generation_config.json +6 -0
- hf_quant_config.json +47 -0
- model.safetensors +3 -0
- preprocessor_config.json +21 -0
- tokenizer.json +3 -0
- tokenizer_config.json +31 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- ko
|
| 6 |
+
base_model:
|
| 7 |
+
- FINAL-Bench/Darwin-9B-Opus
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
tags:
|
| 10 |
+
- darwin
|
| 11 |
+
- mfp4
|
| 12 |
+
- mixed-precision
|
| 13 |
+
- nvfp4
|
| 14 |
+
- quantization
|
| 15 |
+
- reasoning
|
| 16 |
+
- gpqa
|
| 17 |
+
library_name: transformers
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Darwin-9B-MFP4
|
| 21 |
+
|
| 22 |
+
> **Mixed-Precision FP4 quantization for Darwin-9B-Opus**
|
| 23 |
+
> MLP layers compressed to NVFP4 (4-bit), attention preserved in BF16.
|
| 24 |
+
> **+10pp accuracy** improvement over BF16 baseline on GPQA Diamond dev20.
|
| 25 |
+
|
| 26 |
+
## 🎯 Highlights
|
| 27 |
+
|
| 28 |
+
| Metric | BF16 baseline | **MFP4** (this model) | Δ |
|
| 29 |
+
|---|---|---|---|
|
| 30 |
+
| **GPQA dev20 accuracy** | 50.0% | **60.0%** | **+10pp** ✅ |
|
| 31 |
+
| **Truncation rate** | 55.0% | **20.0%** | **-35pp** ✨ |
|
| 32 |
+
| **Avg tokens used** | 3994 | **2835** | -29% |
|
| 33 |
+
| **Disk size** | 19 GB | **11 GB** | **-42%** |
|
| 34 |
+
| **VRAM (inference)** | ~22 GB | **~13 GB** | **-41%** |
|
| 35 |
+
|
| 36 |
+
**🔬 Key finding**: Quantization noise acts as a *reasoning regularizer* in 9B-scale models. Quantizing only MLP layers (not attention) breaks the infinite-reasoning loop and yields decisive answers.
|
| 37 |
+
|
| 38 |
+
## 📐 What is MFP4?
|
| 39 |
+
|
| 40 |
+
**MFP4 = Mixed FP4** — a Darwin-specific mixed-precision quantization scheme:
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
Component | Precision | Notes
|
| 44 |
+
------------------|-----------|--------------------------------
|
| 45 |
+
MLP (gate/up/down)| NVFP4 (4) | ~70% of params, quantized
|
| 46 |
+
Attention (q/k/v/o)| BF16 | Preserved for long-range reasoning
|
| 47 |
+
Linear-attention | BF16 | Preserved
|
| 48 |
+
LM head, Embed | BF16 | Critical I/O paths
|
| 49 |
+
LayerNorm | BF16 | Scale factors
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
This contrasts with naive Full FP4 (compresses everything → 50% accuracy, regression) or Attention-only FP4 (compresses only attention → 40% accuracy, severe regression). **Only MLP-only FP4 wins**.
|
| 53 |
+
|
| 54 |
+
## 🧪 Experimental validation (GPQA Diamond dev20)
|
| 55 |
+
|
| 56 |
+
We tested 4 quantization schemes on Darwin-9B-Opus, plus a NEG-finetuned variant:
|
| 57 |
+
|
| 58 |
+
| Variant | dev20 acc | Truncation | Memory | Conclusion |
|
| 59 |
+
|---|---|---|---|---|
|
| 60 |
+
| BF16 (original) | 50.0% | 55% | 19 GB | Reasoning loops dominate |
|
| 61 |
+
| V1: Full FP4 (everything) | 50.0% | 35% | 7.5 GB | Same as BF16 — attention loss cancels MLP gain |
|
| 62 |
+
| **V2: MFP4 (this)** | **60.0%** | **20%** | **11 GB** | **🏆 Winner** |
|
| 63 |
+
| V3: Attn-only FP4 | 40.0% | 50% | 14 GB | Attention quantization is harmful |
|
| 64 |
+
| NEG-MFP4 (NEG base) | 60.0% | 20% | 11 GB | NEG weights without external module = same as Opus |
|
| 65 |
+
|
| 66 |
+
### Per-category dev20 breakdown (dev20 stratified)
|
| 67 |
+
|
| 68 |
+
| Category | BF16 | V1 Full | **MFP4** | V3 Attn-only |
|
| 69 |
+
|---|---|---|---|---|
|
| 70 |
+
| Easy (5) | 5/5 | 5/5 | 4/5 | 4/5 |
|
| 71 |
+
| Close-tie (5) | 1/5 | 1/5 | **2/5** | 2/5 |
|
| 72 |
+
| Final-wrong (5) | 1/5 | 0/5 | 1/5 | 0/5 |
|
| 73 |
+
| **Flipped-perm (5)** | 3/5 | 4/5 | **5/5 (100%)** | 2/5 |
|
| 74 |
+
|
| 75 |
+
**MFP4's edge comes from Flipped-perm category** — questions that require stable reasoning when answer positions are randomly shuffled. The +10pp gain is concentrated there.
|
| 76 |
+
|
| 77 |
+
## ⚠️ Scale dependence (important!)
|
| 78 |
+
|
| 79 |
+
**MFP4 effect inverts at larger scales**:
|
| 80 |
+
|
| 81 |
+
| Model | BF16 dev20 | MFP4 dev20 | Δ |
|
| 82 |
+
|---|---|---|---|
|
| 83 |
+
| **Darwin-9B-Opus** | 50% | **60%** | **+10pp** ✅ |
|
| 84 |
+
| Darwin-28B-Opus | 75% | 60% | **-15pp** ❌ |
|
| 85 |
+
|
| 86 |
+
**Why?** 9B-Opus has 55% truncation in BF16 (struggles to commit). Quantization noise breaks loops → +10pp gain.
|
| 87 |
+
28B-Opus has 0% truncation in BF16 (already decisive). Quantization just removes useful information → -15pp loss.
|
| 88 |
+
|
| 89 |
+
**MFP4 is recommended only at 9B scale or smaller.**
|
| 90 |
+
|
| 91 |
+
## 🚀 Usage
|
| 92 |
+
|
| 93 |
+
### vLLM (recommended)
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
pip install vllm>=0.19 nvidia-modelopt
|
| 97 |
+
|
| 98 |
+
vllm serve FINAL-Bench/Darwin-9B-MFP4 \
|
| 99 |
+
--quantization modelopt_fp4 \
|
| 100 |
+
--trust-remote-code \
|
| 101 |
+
--port 8000 \
|
| 102 |
+
--enforce-eager \
|
| 103 |
+
--max-model-len 8192 \
|
| 104 |
+
--gpu-memory-utilization 0.85
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
### OpenAI-compatible client
|
| 108 |
+
|
| 109 |
+
```python
|
| 110 |
+
from openai import OpenAI
|
| 111 |
+
|
| 112 |
+
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
| 113 |
+
response = client.chat.completions.create(
|
| 114 |
+
model="FINAL-Bench/Darwin-9B-MFP4",
|
| 115 |
+
messages=[{"role": "user", "content": "Solve: ..."}],
|
| 116 |
+
max_tokens=4096,
|
| 117 |
+
temperature=0.0,
|
| 118 |
+
)
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
## 📊 Hardware requirements
|
| 122 |
+
|
| 123 |
+
| GPU | Status |
|
| 124 |
+
|---|---|
|
| 125 |
+
| **NVIDIA Blackwell (B200, 5090)** | ✅ Native NVFP4 support — fastest |
|
| 126 |
+
| NVIDIA Hopper (H100/H200) | ✅ FLASHINFER_CUTLASS NVFP4 path |
|
| 127 |
+
| NVIDIA Ada (L40, RTX 6000) | ⚠️ FP8 emulation possible |
|
| 128 |
+
| Older (A100, V100) | ❌ Not supported |
|
| 129 |
+
|
| 130 |
+
**Minimum VRAM**: ~13 GB for inference. Fits comfortably on a single 24GB consumer GPU.
|
| 131 |
+
|
| 132 |
+
## 🔧 Quantization recipe
|
| 133 |
+
|
| 134 |
+
This model was created using NVIDIA ModelOpt with `NVFP4_MLP_ONLY_CFG`:
|
| 135 |
+
|
| 136 |
+
```python
|
| 137 |
+
import modelopt.torch.quantization as mtq
|
| 138 |
+
from modelopt.torch.export import export_hf_checkpoint
|
| 139 |
+
|
| 140 |
+
# Calibrated on 8 GPQA Diamond samples
|
| 141 |
+
mtq.quantize(model, mtq.NVFP4_MLP_ONLY_CFG, forward_loop=...)
|
| 142 |
+
export_hf_checkpoint(model, export_dir="./Darwin-9B-MFP4")
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
After export, the config requires patching to restore the multimodal wrapper (`Qwen3_5ForConditionalGeneration` with `text_config`). See repository for `patch_nvfp4_config.py`.
|
| 146 |
+
|
| 147 |
+
## 🎓 Citation
|
| 148 |
+
|
| 149 |
+
If you use this model or the MFP4 technique, please cite:
|
| 150 |
+
|
| 151 |
+
```bibtex
|
| 152 |
+
@misc{darwin-mfp4-2026,
|
| 153 |
+
title={Darwin-9B-MFP4: Mixed-Precision FP4 as a Reasoning Regularizer for Hybrid Attention Models},
|
| 154 |
+
author={Darwin / FINAL-Bench Team},
|
| 155 |
+
year={2026},
|
| 156 |
+
publisher={HuggingFace},
|
| 157 |
+
howpublished={\url{https://huggingface.co/FINAL-Bench/Darwin-9B-MFP4}}
|
| 158 |
+
}
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
## 🙏 Credits
|
| 162 |
+
|
| 163 |
+
- **Base model**: [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) (evolutionary merge of Qwen3.5 family)
|
| 164 |
+
- **Quantization stack**: NVIDIA ModelOpt + vLLM + NVFP4 native kernels
|
| 165 |
+
- **Inspiration**: Darwin V7 MRI taxonomy (per-category tensor analysis)
|
| 166 |
+
|
| 167 |
+
## 📜 License
|
| 168 |
+
|
| 169 |
+
Apache 2.0 (inherited from base model)
|
| 170 |
+
|
| 171 |
+
## 🔬 Related models
|
| 172 |
+
|
| 173 |
+
- [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) — BF16 base
|
| 174 |
+
- [FINAL-Bench/Darwin-9B-NEG](https://huggingface.co/FINAL-Bench/Darwin-9B-NEG) — Native Entropy Gating variant
|
| 175 |
+
- [FINAL-Bench/Darwin-28B-Opus](https://huggingface.co/FINAL-Bench/Darwin-28B-Opus) — Larger sibling (BF16 only — MFP4 not recommended at 28B)
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- set image_count = namespace(value=0) %}
|
| 2 |
+
{%- set video_count = namespace(value=0) %}
|
| 3 |
+
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
|
| 4 |
+
{%- if content is string %}
|
| 5 |
+
{{- content }}
|
| 6 |
+
{%- elif content is iterable and content is not mapping %}
|
| 7 |
+
{%- for item in content %}
|
| 8 |
+
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
|
| 9 |
+
{%- if is_system_content %}
|
| 10 |
+
{{- raise_exception('System message cannot contain images.') }}
|
| 11 |
+
{%- endif %}
|
| 12 |
+
{%- if do_vision_count %}
|
| 13 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{%- if add_vision_id %}
|
| 16 |
+
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 17 |
+
{%- endif %}
|
| 18 |
+
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
|
| 19 |
+
{%- elif 'video' in item or item.type == 'video' %}
|
| 20 |
+
{%- if is_system_content %}
|
| 21 |
+
{{- raise_exception('System message cannot contain videos.') }}
|
| 22 |
+
{%- endif %}
|
| 23 |
+
{%- if do_vision_count %}
|
| 24 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
{%- if add_vision_id %}
|
| 27 |
+
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
|
| 30 |
+
{%- elif 'text' in item %}
|
| 31 |
+
{{- item.text }}
|
| 32 |
+
{%- else %}
|
| 33 |
+
{{- raise_exception('Unexpected item type in content.') }}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endfor %}
|
| 36 |
+
{%- elif content is none or content is undefined %}
|
| 37 |
+
{{- '' }}
|
| 38 |
+
{%- else %}
|
| 39 |
+
{{- raise_exception('Unexpected content type.') }}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- endmacro %}
|
| 42 |
+
{%- if not messages %}
|
| 43 |
+
{{- raise_exception('No messages provided.') }}
|
| 44 |
+
{%- endif %}
|
| 45 |
+
{%- if tools and tools is iterable and tools is not mapping %}
|
| 46 |
+
{{- '<|im_start|>system\n' }}
|
| 47 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
|
| 48 |
+
{%- for tool in tools %}
|
| 49 |
+
{{- "\n" }}
|
| 50 |
+
{{- tool | tojson }}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{{- "\n</tools>" }}
|
| 53 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 54 |
+
{%- if messages[0].role == 'system' %}
|
| 55 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 56 |
+
{%- if content %}
|
| 57 |
+
{{- '\n\n' + content }}
|
| 58 |
+
{%- endif %}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{{- '<|im_end|>\n' }}
|
| 61 |
+
{%- else %}
|
| 62 |
+
{%- if messages[0].role == 'system' %}
|
| 63 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 64 |
+
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
{%- endif %}
|
| 67 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 68 |
+
{%- for message in messages[::-1] %}
|
| 69 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 70 |
+
{%- if ns.multi_step_tool and message.role == "user" %}
|
| 71 |
+
{%- set content = render_content(message.content, false)|trim %}
|
| 72 |
+
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 73 |
+
{%- set ns.multi_step_tool = false %}
|
| 74 |
+
{%- set ns.last_query_index = index %}
|
| 75 |
+
{%- endif %}
|
| 76 |
+
{%- endif %}
|
| 77 |
+
{%- endfor %}
|
| 78 |
+
{%- if ns.multi_step_tool %}
|
| 79 |
+
{{- raise_exception('No user query found in messages.') }}
|
| 80 |
+
{%- endif %}
|
| 81 |
+
{%- for message in messages %}
|
| 82 |
+
{%- set content = render_content(message.content, true)|trim %}
|
| 83 |
+
{%- if message.role == "system" %}
|
| 84 |
+
{%- if not loop.first %}
|
| 85 |
+
{{- raise_exception('System message must be at the beginning.') }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- elif message.role == "user" %}
|
| 88 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 89 |
+
{%- elif message.role == "assistant" %}
|
| 90 |
+
{%- set reasoning_content = '' %}
|
| 91 |
+
{%- if message.reasoning_content is string %}
|
| 92 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 93 |
+
{%- else %}
|
| 94 |
+
{%- if '</think>' in content %}
|
| 95 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 96 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 97 |
+
{%- endif %}
|
| 98 |
+
{%- endif %}
|
| 99 |
+
{%- set reasoning_content = reasoning_content|trim %}
|
| 100 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 101 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 102 |
+
{%- else %}
|
| 103 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 104 |
+
{%- endif %}
|
| 105 |
+
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
|
| 106 |
+
{%- for tool_call in message.tool_calls %}
|
| 107 |
+
{%- if tool_call.function is defined %}
|
| 108 |
+
{%- set tool_call = tool_call.function %}
|
| 109 |
+
{%- endif %}
|
| 110 |
+
{%- if loop.first %}
|
| 111 |
+
{%- if content|trim %}
|
| 112 |
+
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 113 |
+
{%- else %}
|
| 114 |
+
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 115 |
+
{%- endif %}
|
| 116 |
+
{%- else %}
|
| 117 |
+
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 118 |
+
{%- endif %}
|
| 119 |
+
{%- if tool_call.arguments is defined %}
|
| 120 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 121 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 122 |
+
{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
|
| 123 |
+
{{- args_value }}
|
| 124 |
+
{{- '\n</parameter>\n' }}
|
| 125 |
+
{%- endfor %}
|
| 126 |
+
{%- endif %}
|
| 127 |
+
{{- '</function>\n</tool_call>' }}
|
| 128 |
+
{%- endfor %}
|
| 129 |
+
{%- endif %}
|
| 130 |
+
{{- '<|im_end|>\n' }}
|
| 131 |
+
{%- elif message.role == "tool" %}
|
| 132 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 133 |
+
{{- '<|im_start|>user' }}
|
| 134 |
+
{%- endif %}
|
| 135 |
+
{{- '\n<tool_response>\n' }}
|
| 136 |
+
{{- content }}
|
| 137 |
+
{{- '\n</tool_response>' }}
|
| 138 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 139 |
+
{{- '<|im_end|>\n' }}
|
| 140 |
+
{%- elif loop.last %}
|
| 141 |
+
{{- '<|im_end|>\n' }}
|
| 142 |
+
{%- endif %}
|
| 143 |
+
{%- else %}
|
| 144 |
+
{{- raise_exception('Unexpected message role.') }}
|
| 145 |
+
{%- endif %}
|
| 146 |
+
{%- endfor %}
|
| 147 |
+
{%- if add_generation_prompt %}
|
| 148 |
+
{{- '<|im_start|>assistant\n' }}
|
| 149 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 150 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 151 |
+
{%- else %}
|
| 152 |
+
{{- '<think>\n' }}
|
| 153 |
+
{%- endif %}
|
| 154 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3_5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"image_token_id": 248056,
|
| 6 |
+
"model_type": "qwen3_5",
|
| 7 |
+
"text_config": {
|
| 8 |
+
"architectures": [
|
| 9 |
+
"Qwen3_5ForCausalLM"
|
| 10 |
+
],
|
| 11 |
+
"attention_bias": false,
|
| 12 |
+
"attention_dropout": 0.0,
|
| 13 |
+
"attn_output_gate": true,
|
| 14 |
+
"bos_token_id": null,
|
| 15 |
+
"dtype": "bfloat16",
|
| 16 |
+
"eos_token_id": 248044,
|
| 17 |
+
"full_attention_interval": 4,
|
| 18 |
+
"head_dim": 256,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 4096,
|
| 21 |
+
"initializer_range": 0.02,
|
| 22 |
+
"intermediate_size": 12288,
|
| 23 |
+
"layer_types": [
|
| 24 |
+
"linear_attention",
|
| 25 |
+
"linear_attention",
|
| 26 |
+
"linear_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"linear_attention",
|
| 29 |
+
"linear_attention",
|
| 30 |
+
"linear_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"linear_attention",
|
| 33 |
+
"linear_attention",
|
| 34 |
+
"linear_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"linear_attention",
|
| 37 |
+
"linear_attention",
|
| 38 |
+
"linear_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"linear_attention",
|
| 41 |
+
"linear_attention",
|
| 42 |
+
"linear_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"linear_attention",
|
| 45 |
+
"linear_attention",
|
| 46 |
+
"linear_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"linear_attention",
|
| 49 |
+
"linear_attention",
|
| 50 |
+
"linear_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"linear_attention",
|
| 53 |
+
"linear_attention",
|
| 54 |
+
"linear_attention",
|
| 55 |
+
"full_attention"
|
| 56 |
+
],
|
| 57 |
+
"linear_conv_kernel_dim": 4,
|
| 58 |
+
"linear_key_head_dim": 128,
|
| 59 |
+
"linear_num_key_heads": 16,
|
| 60 |
+
"linear_num_value_heads": 32,
|
| 61 |
+
"linear_value_head_dim": 128,
|
| 62 |
+
"mamba_ssm_dtype": "float32",
|
| 63 |
+
"max_position_embeddings": 262144,
|
| 64 |
+
"mlp_only_layers": [],
|
| 65 |
+
"model_type": "qwen3_5_text",
|
| 66 |
+
"mtp_num_hidden_layers": 1,
|
| 67 |
+
"mtp_use_dedicated_embeddings": false,
|
| 68 |
+
"num_attention_heads": 16,
|
| 69 |
+
"num_hidden_layers": 32,
|
| 70 |
+
"num_key_value_heads": 4,
|
| 71 |
+
"pad_token_id": null,
|
| 72 |
+
"partial_rotary_factor": 0.25,
|
| 73 |
+
"rms_norm_eps": 1e-06,
|
| 74 |
+
"rope_parameters": {
|
| 75 |
+
"mrope_interleaved": true,
|
| 76 |
+
"mrope_section": [
|
| 77 |
+
11,
|
| 78 |
+
11,
|
| 79 |
+
10
|
| 80 |
+
],
|
| 81 |
+
"partial_rotary_factor": 0.25,
|
| 82 |
+
"rope_theta": 10000000,
|
| 83 |
+
"rope_type": "default"
|
| 84 |
+
},
|
| 85 |
+
"tie_word_embeddings": false,
|
| 86 |
+
"transformers_version": "5.5.4",
|
| 87 |
+
"use_cache": true,
|
| 88 |
+
"vocab_size": 248320,
|
| 89 |
+
"quantization_config": {
|
| 90 |
+
"config_groups": {
|
| 91 |
+
"group_0": {
|
| 92 |
+
"input_activations": {
|
| 93 |
+
"dynamic": false,
|
| 94 |
+
"num_bits": 4,
|
| 95 |
+
"type": "float",
|
| 96 |
+
"group_size": 16
|
| 97 |
+
},
|
| 98 |
+
"weights": {
|
| 99 |
+
"dynamic": false,
|
| 100 |
+
"num_bits": 4,
|
| 101 |
+
"type": "float",
|
| 102 |
+
"group_size": 16
|
| 103 |
+
},
|
| 104 |
+
"targets": [
|
| 105 |
+
"Linear"
|
| 106 |
+
]
|
| 107 |
+
}
|
| 108 |
+
},
|
| 109 |
+
"ignore": [
|
| 110 |
+
"lm_head",
|
| 111 |
+
"model.layers.0.linear_attn*",
|
| 112 |
+
"model.layers.1.linear_attn*",
|
| 113 |
+
"model.layers.10.linear_attn*",
|
| 114 |
+
"model.layers.11.self_attn*",
|
| 115 |
+
"model.layers.12.linear_attn*",
|
| 116 |
+
"model.layers.13.linear_attn*",
|
| 117 |
+
"model.layers.14.linear_attn*",
|
| 118 |
+
"model.layers.15.self_attn*",
|
| 119 |
+
"model.layers.16.linear_attn*",
|
| 120 |
+
"model.layers.17.linear_attn*",
|
| 121 |
+
"model.layers.18.linear_attn*",
|
| 122 |
+
"model.layers.19.self_attn*",
|
| 123 |
+
"model.layers.2.linear_attn*",
|
| 124 |
+
"model.layers.20.linear_attn*",
|
| 125 |
+
"model.layers.21.linear_attn*",
|
| 126 |
+
"model.layers.22.linear_attn*",
|
| 127 |
+
"model.layers.23.self_attn*",
|
| 128 |
+
"model.layers.24.linear_attn*",
|
| 129 |
+
"model.layers.25.linear_attn*",
|
| 130 |
+
"model.layers.26.linear_attn*",
|
| 131 |
+
"model.layers.27.self_attn*",
|
| 132 |
+
"model.layers.28.linear_attn*",
|
| 133 |
+
"model.layers.29.linear_attn*",
|
| 134 |
+
"model.layers.3.self_attn*",
|
| 135 |
+
"model.layers.30.linear_attn*",
|
| 136 |
+
"model.layers.31.self_attn*",
|
| 137 |
+
"model.layers.4.linear_attn*",
|
| 138 |
+
"model.layers.5.linear_attn*",
|
| 139 |
+
"model.layers.6.linear_attn*",
|
| 140 |
+
"model.layers.7.self_attn*",
|
| 141 |
+
"model.layers.8.linear_attn*",
|
| 142 |
+
"model.layers.9.linear_attn*",
|
| 143 |
+
"lm_head"
|
| 144 |
+
],
|
| 145 |
+
"quant_algo": "NVFP4",
|
| 146 |
+
"producer": {
|
| 147 |
+
"name": "modelopt",
|
| 148 |
+
"version": "0.39.0"
|
| 149 |
+
},
|
| 150 |
+
"quant_method": "modelopt"
|
| 151 |
+
}
|
| 152 |
+
},
|
| 153 |
+
"tie_word_embeddings": false,
|
| 154 |
+
"transformers_version": "4.57.0.dev0",
|
| 155 |
+
"video_token_id": 248057,
|
| 156 |
+
"vision_config": {
|
| 157 |
+
"deepstack_visual_indexes": [],
|
| 158 |
+
"depth": 27,
|
| 159 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 160 |
+
"hidden_size": 1152,
|
| 161 |
+
"in_channels": 3,
|
| 162 |
+
"initializer_range": 0.02,
|
| 163 |
+
"intermediate_size": 4304,
|
| 164 |
+
"model_type": "qwen3_5",
|
| 165 |
+
"num_heads": 16,
|
| 166 |
+
"num_position_embeddings": 2304,
|
| 167 |
+
"out_hidden_size": 4096,
|
| 168 |
+
"patch_size": 16,
|
| 169 |
+
"spatial_merge_size": 2,
|
| 170 |
+
"temporal_patch_size": 2
|
| 171 |
+
},
|
| 172 |
+
"vision_end_token_id": 248054,
|
| 173 |
+
"vision_start_token_id": 248053,
|
| 174 |
+
"quantization_config": {
|
| 175 |
+
"config_groups": {
|
| 176 |
+
"group_0": {
|
| 177 |
+
"input_activations": {
|
| 178 |
+
"dynamic": false,
|
| 179 |
+
"num_bits": 4,
|
| 180 |
+
"type": "float",
|
| 181 |
+
"group_size": 16
|
| 182 |
+
},
|
| 183 |
+
"weights": {
|
| 184 |
+
"dynamic": false,
|
| 185 |
+
"num_bits": 4,
|
| 186 |
+
"type": "float",
|
| 187 |
+
"group_size": 16
|
| 188 |
+
},
|
| 189 |
+
"targets": [
|
| 190 |
+
"Linear"
|
| 191 |
+
]
|
| 192 |
+
}
|
| 193 |
+
},
|
| 194 |
+
"ignore": [
|
| 195 |
+
"lm_head",
|
| 196 |
+
"model.layers.0.linear_attn*",
|
| 197 |
+
"model.layers.1.linear_attn*",
|
| 198 |
+
"model.layers.10.linear_attn*",
|
| 199 |
+
"model.layers.11.self_attn*",
|
| 200 |
+
"model.layers.12.linear_attn*",
|
| 201 |
+
"model.layers.13.linear_attn*",
|
| 202 |
+
"model.layers.14.linear_attn*",
|
| 203 |
+
"model.layers.15.self_attn*",
|
| 204 |
+
"model.layers.16.linear_attn*",
|
| 205 |
+
"model.layers.17.linear_attn*",
|
| 206 |
+
"model.layers.18.linear_attn*",
|
| 207 |
+
"model.layers.19.self_attn*",
|
| 208 |
+
"model.layers.2.linear_attn*",
|
| 209 |
+
"model.layers.20.linear_attn*",
|
| 210 |
+
"model.layers.21.linear_attn*",
|
| 211 |
+
"model.layers.22.linear_attn*",
|
| 212 |
+
"model.layers.23.self_attn*",
|
| 213 |
+
"model.layers.24.linear_attn*",
|
| 214 |
+
"model.layers.25.linear_attn*",
|
| 215 |
+
"model.layers.26.linear_attn*",
|
| 216 |
+
"model.layers.27.self_attn*",
|
| 217 |
+
"model.layers.28.linear_attn*",
|
| 218 |
+
"model.layers.29.linear_attn*",
|
| 219 |
+
"model.layers.3.self_attn*",
|
| 220 |
+
"model.layers.30.linear_attn*",
|
| 221 |
+
"model.layers.31.self_attn*",
|
| 222 |
+
"model.layers.4.linear_attn*",
|
| 223 |
+
"model.layers.5.linear_attn*",
|
| 224 |
+
"model.layers.6.linear_attn*",
|
| 225 |
+
"model.layers.7.self_attn*",
|
| 226 |
+
"model.layers.8.linear_attn*",
|
| 227 |
+
"model.layers.9.linear_attn*",
|
| 228 |
+
"lm_head"
|
| 229 |
+
],
|
| 230 |
+
"quant_algo": "NVFP4",
|
| 231 |
+
"producer": {
|
| 232 |
+
"name": "modelopt",
|
| 233 |
+
"version": "0.39.0"
|
| 234 |
+
},
|
| 235 |
+
"quant_method": "modelopt"
|
| 236 |
+
}
|
| 237 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": 248044,
|
| 4 |
+
"transformers_version": "5.5.4",
|
| 5 |
+
"use_cache": true
|
| 6 |
+
}
|
hf_quant_config.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"producer": {
|
| 3 |
+
"name": "modelopt",
|
| 4 |
+
"version": "0.39.0"
|
| 5 |
+
},
|
| 6 |
+
"quantization": {
|
| 7 |
+
"quant_algo": "NVFP4",
|
| 8 |
+
"kv_cache_quant_algo": null,
|
| 9 |
+
"group_size": 16,
|
| 10 |
+
"exclude_modules": [
|
| 11 |
+
"lm_head",
|
| 12 |
+
"model.layers.0.linear_attn*",
|
| 13 |
+
"model.layers.1.linear_attn*",
|
| 14 |
+
"model.layers.10.linear_attn*",
|
| 15 |
+
"model.layers.11.self_attn*",
|
| 16 |
+
"model.layers.12.linear_attn*",
|
| 17 |
+
"model.layers.13.linear_attn*",
|
| 18 |
+
"model.layers.14.linear_attn*",
|
| 19 |
+
"model.layers.15.self_attn*",
|
| 20 |
+
"model.layers.16.linear_attn*",
|
| 21 |
+
"model.layers.17.linear_attn*",
|
| 22 |
+
"model.layers.18.linear_attn*",
|
| 23 |
+
"model.layers.19.self_attn*",
|
| 24 |
+
"model.layers.2.linear_attn*",
|
| 25 |
+
"model.layers.20.linear_attn*",
|
| 26 |
+
"model.layers.21.linear_attn*",
|
| 27 |
+
"model.layers.22.linear_attn*",
|
| 28 |
+
"model.layers.23.self_attn*",
|
| 29 |
+
"model.layers.24.linear_attn*",
|
| 30 |
+
"model.layers.25.linear_attn*",
|
| 31 |
+
"model.layers.26.linear_attn*",
|
| 32 |
+
"model.layers.27.self_attn*",
|
| 33 |
+
"model.layers.28.linear_attn*",
|
| 34 |
+
"model.layers.29.linear_attn*",
|
| 35 |
+
"model.layers.3.self_attn*",
|
| 36 |
+
"model.layers.30.linear_attn*",
|
| 37 |
+
"model.layers.31.self_attn*",
|
| 38 |
+
"model.layers.4.linear_attn*",
|
| 39 |
+
"model.layers.5.linear_attn*",
|
| 40 |
+
"model.layers.6.linear_attn*",
|
| 41 |
+
"model.layers.7.self_attn*",
|
| 42 |
+
"model.layers.8.linear_attn*",
|
| 43 |
+
"model.layers.9.linear_attn*",
|
| 44 |
+
"lm_head"
|
| 45 |
+
]
|
| 46 |
+
}
|
| 47 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2902d0623acd4c50b4c8720aa33f9636e7262a8d62e6841494662376dac96401
|
| 3 |
+
size 10961930304
|
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 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9facde94660f9c53e928aad19c7d6a16d91f5e42d6d581db8d253b4787ee5e19
|
| 3 |
+
size 19989441
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"audio_bos_token": "<|audio_start|>",
|
| 4 |
+
"audio_eos_token": "<|audio_end|>",
|
| 5 |
+
"audio_token": "<|audio_pad|>",
|
| 6 |
+
"backend": "tokenizers",
|
| 7 |
+
"bos_token": null,
|
| 8 |
+
"clean_up_tokenization_spaces": false,
|
| 9 |
+
"eos_token": "<|im_end|>",
|
| 10 |
+
"errors": "replace",
|
| 11 |
+
"image_token": "<|image_pad|>",
|
| 12 |
+
"is_local": true,
|
| 13 |
+
"model_max_length": 262144,
|
| 14 |
+
"model_specific_special_tokens": {
|
| 15 |
+
"audio_bos_token": "<|audio_start|>",
|
| 16 |
+
"audio_eos_token": "<|audio_end|>",
|
| 17 |
+
"audio_token": "<|audio_pad|>",
|
| 18 |
+
"image_token": "<|image_pad|>",
|
| 19 |
+
"video_token": "<|video_pad|>",
|
| 20 |
+
"vision_bos_token": "<|vision_start|>",
|
| 21 |
+
"vision_eos_token": "<|vision_end|>"
|
| 22 |
+
},
|
| 23 |
+
"pad_token": "<|endoftext|>",
|
| 24 |
+
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 25 |
+
"split_special_tokens": false,
|
| 26 |
+
"tokenizer_class": "TokenizersBackend",
|
| 27 |
+
"unk_token": null,
|
| 28 |
+
"video_token": "<|video_pad|>",
|
| 29 |
+
"vision_bos_token": "<|vision_start|>",
|
| 30 |
+
"vision_eos_token": "<|vision_end|>"
|
| 31 |
+
}
|