Initial release: NVFP4 + MTP head bf16-restored, VLM kept (vision tower bf16), abliterated
Browse files- .gitattributes +1 -0
- README.md +205 -0
- chat_template.jinja +154 -0
- config.json +236 -0
- generation_config.json +13 -0
- hf_quant_config.json +63 -0
- model.safetensors +3 -0
- preprocessor_config.json +21 -0
- tokenizer.json +3 -0
- tokenizer_config.json +31 -0
- video_preprocessor_config.json +21 -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,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: huihui-ai/Huihui-Qwen3.6-27B-abliterated
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- qwen3_5
|
| 8 |
+
- qwen3.6
|
| 9 |
+
- nvfp4
|
| 10 |
+
- quantized
|
| 11 |
+
- modelopt
|
| 12 |
+
- mtp
|
| 13 |
+
- speculative-decoding
|
| 14 |
+
- blackwell
|
| 15 |
+
- abliterated
|
| 16 |
+
- multimodal
|
| 17 |
+
- image-text-to-text
|
| 18 |
+
- vlm
|
| 19 |
+
pipeline_tag: image-text-to-text
|
| 20 |
+
language:
|
| 21 |
+
- en
|
| 22 |
+
- zh
|
| 23 |
+
- ja
|
| 24 |
+
- ko
|
| 25 |
+
- fr
|
| 26 |
+
- de
|
| 27 |
+
- es
|
| 28 |
+
- it
|
| 29 |
+
- pt
|
| 30 |
+
- ru
|
| 31 |
+
- ar
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
# Huihui-Qwen3.6-27B-abliterated-NVFP4-MTP
|
| 35 |
+
|
| 36 |
+
NVFP4-quantized **multimodal** abliterated sibling of [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B), with the **MTP (Multi-Token Prediction) head restored in bf16** so speculative decoding works.
|
| 37 |
+
|
| 38 |
+
Vision tower is **kept** (in bf16 — image and video input still work).
|
| 39 |
+
|
| 40 |
+
## Sibling repos
|
| 41 |
+
|
| 42 |
+
| | This repo | Text-only sibling | Original VLM (compressed-tensors) |
|
| 43 |
+
|---|---|---|---|
|
| 44 |
+
| Repo | `Huihui-Qwen3.6-27B-abliterated-NVFP4-MTP` | [`Qwen3.6-27B-Text-NVFP4-MTP`](https://huggingface.co/sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP) | [`Huihui-Qwen3.6-27B-abliterated-NVFP4`](https://huggingface.co/sakamakismile/Huihui-Qwen3.6-27B-abliterated-NVFP4) |
|
| 45 |
+
| Vision input | **✅ image + video** | ❌ text-only | ✅ |
|
| 46 |
+
| Quantization format | **`modelopt`** (vLLM SM120 native path) | `modelopt` | `compressed-tensors` |
|
| 47 |
+
| MTP head | **✅ bf16, working** | ✅ bf16, working | ❌ dropped → 0% acceptance |
|
| 48 |
+
| Abliterated | **✅ (huihui-ai base)** | ❌ | ✅ |
|
| 49 |
+
|
| 50 |
+
## What's different from the original `Huihui-Qwen3.6-27B-abliterated-NVFP4`
|
| 51 |
+
|
| 52 |
+
The original repo was quantized with `llmcompressor` to `compressed-tensors` format
|
| 53 |
+
and had the same problem we hit on the official Qwen repo: `AutoModelForCausalLM`
|
| 54 |
+
silently drops the MTP head during export, leading to 0% draft acceptance, **and**
|
| 55 |
+
`compressed-tensors` NVFP4 takes a slower fallback path on Blackwell SM120 in
|
| 56 |
+
vLLM 0.19.x.
|
| 57 |
+
|
| 58 |
+
This repo:
|
| 59 |
+
|
| 60 |
+
1. **Quantization format**: `modelopt` (native NVFP4 GEMM via
|
| 61 |
+
`FlashInferCutlassNvFp4LinearKernel` on Blackwell)
|
| 62 |
+
2. **MTP head**: 15 `mtp.*` tensors (~850 MB, bf16) re-grafted from the original
|
| 63 |
+
bf16 base, and added to `quantization_config.ignore`
|
| 64 |
+
3. **Vision tower**: **kept** in bf16 (`*visual*` on the ignore list — image
|
| 65 |
+
encoder integrity preserved)
|
| 66 |
+
4. **Mamba/SSM convs**: `*linear_attn.conv1d*` is on `modelopt`'s default ignore
|
| 67 |
+
list, so the hybrid layer convolutions stay in bf16
|
| 68 |
+
5. **Abliteration**: inherited from the upstream [`huihui-ai/Huihui-Qwen3.6-27B-abliterated`](https://huggingface.co/huihui-ai/Huihui-Qwen3.6-27B-abliterated) base — no
|
| 69 |
+
additional alignment pass
|
| 70 |
+
|
| 71 |
+
## Why "Unsensor"?
|
| 72 |
+
|
| 73 |
+
This is the abliterated counterpart of our text-only release. The intent (per the
|
| 74 |
+
maintainer's [philosophy](https://huggingface.co/sakamakismile)) is **not "remove
|
| 75 |
+
the chains" but "remove the colored glasses"** — let the model observe and reason
|
| 76 |
+
neutrally, without the strong refusal-shaped priors learned during alignment.
|
| 77 |
+
You're expected to use it responsibly.
|
| 78 |
+
|
| 79 |
+
## Quantization details
|
| 80 |
+
|
| 81 |
+
- **Base**: `huihui-ai/Huihui-Qwen3.6-27B-abliterated` (bf16, 27.78B params,
|
| 82 |
+
hybrid linear-attn + full-attn, 64 layers, 1 MTP layer)
|
| 83 |
+
- **Quantizer**: `nvidia-modelopt` 0.43.0 with `NVFP4_DEFAULT_CFG`
|
| 84 |
+
- **Calibration**: 20 samples from `neuralmagic/calibration` (LLM split),
|
| 85 |
+
max_seq_len 8192
|
| 86 |
+
- **Ignored from quantization** (kept in bf16):
|
| 87 |
+
- `lm_head`
|
| 88 |
+
- All `model.visual.*` (vision tower bf16-preserved)
|
| 89 |
+
- All `*linear_attn.conv1d*` (Mamba-style SSM convolutions, 48 of 64 layers)
|
| 90 |
+
- All `mtp.*` modules (15 tensors, ~850 MB bf16)
|
| 91 |
+
- Other `NVFP4_DEFAULT_CFG` defaults (router, mlp.gate, output_layer …)
|
| 92 |
+
|
| 93 |
+
## Usage with vLLM (Blackwell, SM120)
|
| 94 |
+
|
| 95 |
+
### With image input + MTP speculative decoding
|
| 96 |
+
|
| 97 |
+
```bash
|
| 98 |
+
vllm serve sakamakismile/Huihui-Qwen3.6-27B-abliterated-NVFP4-MTP \
|
| 99 |
+
--trust-remote-code \
|
| 100 |
+
--gpu-memory-utilization 0.85 \
|
| 101 |
+
--max-model-len 8192 \
|
| 102 |
+
--quantization modelopt \
|
| 103 |
+
--speculative-config '{"method":"qwen3_5_mtp","num_speculative_tokens":1}'
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
Then send an image-aware request:
|
| 107 |
+
|
| 108 |
+
```bash
|
| 109 |
+
curl http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
|
| 110 |
+
"model": "sakamakismile/Huihui-Qwen3.6-27B-abliterated-NVFP4-MTP",
|
| 111 |
+
"messages": [{
|
| 112 |
+
"role": "user",
|
| 113 |
+
"content": [
|
| 114 |
+
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}},
|
| 115 |
+
{"type": "text", "text": "Describe what you see in this image."}
|
| 116 |
+
]
|
| 117 |
+
}],
|
| 118 |
+
"max_tokens": 400
|
| 119 |
+
}'
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
`num_speculative_tokens: 1` because the model has a single MTP layer
|
| 123 |
+
(`mtp_num_hidden_layers=1`). The handler `qwen3_5_mtp` is internally
|
| 124 |
+
normalized to `mtp` by current vLLM (deprecated-name warning is harmless).
|
| 125 |
+
|
| 126 |
+
### Multi-instance + KV FP8 (high-throughput serving)
|
| 127 |
+
|
| 128 |
+
For aggregate-throughput serving on a 6-GPU Blackwell box, two instances per
|
| 129 |
+
GPU with `--kv-cache-dtype fp8` is the recommended layout:
|
| 130 |
+
|
| 131 |
+
```bash
|
| 132 |
+
CUDA_VISIBLE_DEVICES=0 vllm serve <repo> \
|
| 133 |
+
--gpu-memory-utilization 0.45 \
|
| 134 |
+
--kv-cache-dtype fp8 \
|
| 135 |
+
--max-model-len 8192 \
|
| 136 |
+
--quantization modelopt \
|
| 137 |
+
--speculative-config '{"method":"qwen3_5_mtp","num_speculative_tokens":1}' \
|
| 138 |
+
--port 8002 &
|
| 139 |
+
# repeat for ports 8003-8013 across CUDA_VISIBLE_DEVICES 0..5
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
KV FP8 is verified to introduce no measurable quality regression on the
|
| 143 |
+
Qwen3.5/3.6 family; halving the KV footprint approximately doubles the
|
| 144 |
+
in-flight slot budget per instance.
|
| 145 |
+
|
| 146 |
+
## Verified locally (RTX PRO 6000 Blackwell, vLLM 0.19.1rc1)
|
| 147 |
+
|
| 148 |
+
Single request, T=0.7, 2000-token long-form decode across 4 domains:
|
| 149 |
+
|
| 150 |
+
| Domain | tok/s |
|
| 151 |
+
|---|---|
|
| 152 |
+
| Technical (CS) | 87.0 |
|
| 153 |
+
| Literary (Japanese) | 76.4 |
|
| 154 |
+
| Reasoning (math) | 90.6 |
|
| 155 |
+
| Code review | 90.5 |
|
| 156 |
+
| **mean** | **86.9** |
|
| 157 |
+
|
| 158 |
+
- **MTP acceptance**: 81.1% on long-form (T=0.7), 86.8% on short prompts (T=0)
|
| 159 |
+
- **Image input** (Pexels cat / HF logo / code screenshot / public domain art):
|
| 160 |
+
77–84 tok/s with image preprocess included; output is coherent and
|
| 161 |
+
domain-aware
|
| 162 |
+
|
| 163 |
+
### Aggregate throughput (6 GPUs, 1 instance per GPU, max-num-seqs=2)
|
| 164 |
+
|
| 165 |
+
12 concurrent requests (× 500 tokens, T=0.7) round-robined across 6 endpoints:
|
| 166 |
+
|
| 167 |
+
| metric | value |
|
| 168 |
+
|---|---|
|
| 169 |
+
| concurrency | 12 (= 6 GPUs × 2 in-flight) |
|
| 170 |
+
| successful requests | 12 / 12 |
|
| 171 |
+
| wall time | 9.0 s |
|
| 172 |
+
| **aggregate tok/s** | **648.4** |
|
| 173 |
+
| avg per-req tok/s | 57.3 |
|
| 174 |
+
| MTP acceptance | 80.1% |
|
| 175 |
+
|
| 176 |
+
That's ~7.5× the single-request decode rate, which is the realistic ceiling
|
| 177 |
+
for a 6 × RTX PRO 6000 Blackwell box serving this model concurrently —
|
| 178 |
+
each user lands on a GPU that handles up to 2 in-flight requests at a
|
| 179 |
+
time via vLLM's continuous batching. (Co-resident multi-instance per GPU
|
| 180 |
+
was attempted and rejected: vLLM V1 cannot share VRAM accounting across
|
| 181 |
+
two processes on the same GPU, so a 12-instance / 24-in-flight layout
|
| 182 |
+
hits CUDA OOM during cuda-graph capture; this is upstream-known. RTX PRO
|
| 183 |
+
6000 Blackwell *Workstation* does not expose MIG either.)
|
| 184 |
+
|
| 185 |
+
## Hardware target
|
| 186 |
+
|
| 187 |
+
Built and tested on **NVIDIA RTX PRO 6000 Blackwell (SM120)**. Should also work
|
| 188 |
+
on **RTX 5090** and other Blackwell consumer/workstation cards with sufficient
|
| 189 |
+
VRAM (the model is roughly 15 GB NVFP4 weights + ~5 GB bf16 vision/MTP/SSM/
|
| 190 |
+
lm_head ≈ 20.6 GB on disk, ≈ 21 GB at load with KV cache room on top).
|
| 191 |
+
|
| 192 |
+
## Acknowledgements
|
| 193 |
+
|
| 194 |
+
- [`huihui-ai`](https://huggingface.co/huihui-ai) — for the abliterated base
|
| 195 |
+
- [`Qwen`](https://huggingface.co/Qwen) — for the original Qwen3.6-27B
|
| 196 |
+
- [`osoleve`](https://huggingface.co/osoleve) — for the MTP-restoration recipe
|
| 197 |
+
on Qwen3.5
|
| 198 |
+
- [`nvidia-modelopt`](https://github.com/NVIDIA/TensorRT-Model-Optimizer) team
|
| 199 |
+
- The reporters of Discussions #5 and #7 on the original repo — for catching
|
| 200 |
+
the issues cleanly
|
| 201 |
+
|
| 202 |
+
## License
|
| 203 |
+
|
| 204 |
+
Inherited from the upstream Huihui base (other / abliterated terms apply —
|
| 205 |
+
see [huihui-ai/Huihui-Qwen3.6-27B-abliterated](https://huggingface.co/huihui-ai/Huihui-Qwen3.6-27B-abliterated)).
|
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 (preserve_thinking is defined and preserve_thinking is true) or (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 | string if args_value is string else args_value | tojson | safe %}
|
| 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,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3_5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "bfloat16",
|
| 6 |
+
"image_token_id": 248056,
|
| 7 |
+
"language_model_only": false,
|
| 8 |
+
"model_type": "qwen3_5",
|
| 9 |
+
"text_config": {
|
| 10 |
+
"attention_bias": false,
|
| 11 |
+
"attention_dropout": 0.0,
|
| 12 |
+
"attn_output_gate": true,
|
| 13 |
+
"bos_token_id": 248044,
|
| 14 |
+
"dtype": "bfloat16",
|
| 15 |
+
"eos_token_id": 248044,
|
| 16 |
+
"full_attention_interval": 4,
|
| 17 |
+
"head_dim": 256,
|
| 18 |
+
"hidden_act": "silu",
|
| 19 |
+
"hidden_size": 5120,
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 17408,
|
| 22 |
+
"layer_types": [
|
| 23 |
+
"linear_attention",
|
| 24 |
+
"linear_attention",
|
| 25 |
+
"linear_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"linear_attention",
|
| 28 |
+
"linear_attention",
|
| 29 |
+
"linear_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"linear_attention",
|
| 32 |
+
"linear_attention",
|
| 33 |
+
"linear_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"linear_attention",
|
| 36 |
+
"linear_attention",
|
| 37 |
+
"linear_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"linear_attention",
|
| 40 |
+
"linear_attention",
|
| 41 |
+
"linear_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"linear_attention",
|
| 44 |
+
"linear_attention",
|
| 45 |
+
"linear_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"linear_attention",
|
| 48 |
+
"linear_attention",
|
| 49 |
+
"linear_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"linear_attention",
|
| 52 |
+
"linear_attention",
|
| 53 |
+
"linear_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"linear_attention",
|
| 56 |
+
"linear_attention",
|
| 57 |
+
"linear_attention",
|
| 58 |
+
"full_attention",
|
| 59 |
+
"linear_attention",
|
| 60 |
+
"linear_attention",
|
| 61 |
+
"linear_attention",
|
| 62 |
+
"full_attention",
|
| 63 |
+
"linear_attention",
|
| 64 |
+
"linear_attention",
|
| 65 |
+
"linear_attention",
|
| 66 |
+
"full_attention",
|
| 67 |
+
"linear_attention",
|
| 68 |
+
"linear_attention",
|
| 69 |
+
"linear_attention",
|
| 70 |
+
"full_attention",
|
| 71 |
+
"linear_attention",
|
| 72 |
+
"linear_attention",
|
| 73 |
+
"linear_attention",
|
| 74 |
+
"full_attention",
|
| 75 |
+
"linear_attention",
|
| 76 |
+
"linear_attention",
|
| 77 |
+
"linear_attention",
|
| 78 |
+
"full_attention",
|
| 79 |
+
"linear_attention",
|
| 80 |
+
"linear_attention",
|
| 81 |
+
"linear_attention",
|
| 82 |
+
"full_attention",
|
| 83 |
+
"linear_attention",
|
| 84 |
+
"linear_attention",
|
| 85 |
+
"linear_attention",
|
| 86 |
+
"full_attention"
|
| 87 |
+
],
|
| 88 |
+
"linear_conv_kernel_dim": 4,
|
| 89 |
+
"linear_key_head_dim": 128,
|
| 90 |
+
"linear_num_key_heads": 16,
|
| 91 |
+
"linear_num_value_heads": 48,
|
| 92 |
+
"linear_value_head_dim": 128,
|
| 93 |
+
"mamba_ssm_dtype": "float32",
|
| 94 |
+
"max_position_embeddings": 262144,
|
| 95 |
+
"model_type": "qwen3_5_text",
|
| 96 |
+
"mtp_num_hidden_layers": 1,
|
| 97 |
+
"mtp_use_dedicated_embeddings": false,
|
| 98 |
+
"num_attention_heads": 24,
|
| 99 |
+
"num_hidden_layers": 64,
|
| 100 |
+
"num_key_value_heads": 4,
|
| 101 |
+
"output_gate_type": "swish",
|
| 102 |
+
"pad_token_id": null,
|
| 103 |
+
"partial_rotary_factor": 0.25,
|
| 104 |
+
"rms_norm_eps": 1e-06,
|
| 105 |
+
"rope_parameters": {
|
| 106 |
+
"mrope_interleaved": true,
|
| 107 |
+
"mrope_section": [
|
| 108 |
+
11,
|
| 109 |
+
11,
|
| 110 |
+
10
|
| 111 |
+
],
|
| 112 |
+
"partial_rotary_factor": 0.25,
|
| 113 |
+
"rope_theta": 10000000,
|
| 114 |
+
"rope_type": "default"
|
| 115 |
+
},
|
| 116 |
+
"tie_word_embeddings": false,
|
| 117 |
+
"use_cache": true,
|
| 118 |
+
"vocab_size": 248320
|
| 119 |
+
},
|
| 120 |
+
"tie_word_embeddings": false,
|
| 121 |
+
"transformers_version": "5.5.4",
|
| 122 |
+
"video_token_id": 248057,
|
| 123 |
+
"vision_config": {
|
| 124 |
+
"deepstack_visual_indexes": [],
|
| 125 |
+
"depth": 27,
|
| 126 |
+
"dtype": "bfloat16",
|
| 127 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 128 |
+
"hidden_size": 1152,
|
| 129 |
+
"in_channels": 3,
|
| 130 |
+
"initializer_range": 0.02,
|
| 131 |
+
"intermediate_size": 4304,
|
| 132 |
+
"model_type": "qwen3_5",
|
| 133 |
+
"num_heads": 16,
|
| 134 |
+
"num_position_embeddings": 2304,
|
| 135 |
+
"out_hidden_size": 5120,
|
| 136 |
+
"patch_size": 16,
|
| 137 |
+
"spatial_merge_size": 2,
|
| 138 |
+
"temporal_patch_size": 2
|
| 139 |
+
},
|
| 140 |
+
"vision_end_token_id": 248054,
|
| 141 |
+
"vision_start_token_id": 248053,
|
| 142 |
+
"quantization_config": {
|
| 143 |
+
"config_groups": {
|
| 144 |
+
"group_0": {
|
| 145 |
+
"input_activations": {
|
| 146 |
+
"dynamic": false,
|
| 147 |
+
"num_bits": 4,
|
| 148 |
+
"type": "float",
|
| 149 |
+
"group_size": 16
|
| 150 |
+
},
|
| 151 |
+
"weights": {
|
| 152 |
+
"dynamic": false,
|
| 153 |
+
"num_bits": 4,
|
| 154 |
+
"type": "float",
|
| 155 |
+
"group_size": 16
|
| 156 |
+
},
|
| 157 |
+
"targets": [
|
| 158 |
+
"Linear"
|
| 159 |
+
]
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
"ignore": [
|
| 163 |
+
"lm_head",
|
| 164 |
+
"model.language_model.layers.0.linear_attn.conv1d",
|
| 165 |
+
"model.language_model.layers.1.linear_attn.conv1d",
|
| 166 |
+
"model.language_model.layers.10.linear_attn.conv1d",
|
| 167 |
+
"model.language_model.layers.12.linear_attn.conv1d",
|
| 168 |
+
"model.language_model.layers.13.linear_attn.conv1d",
|
| 169 |
+
"model.language_model.layers.14.linear_attn.conv1d",
|
| 170 |
+
"model.language_model.layers.16.linear_attn.conv1d",
|
| 171 |
+
"model.language_model.layers.17.linear_attn.conv1d",
|
| 172 |
+
"model.language_model.layers.18.linear_attn.conv1d",
|
| 173 |
+
"model.language_model.layers.2.linear_attn.conv1d",
|
| 174 |
+
"model.language_model.layers.20.linear_attn.conv1d",
|
| 175 |
+
"model.language_model.layers.21.linear_attn.conv1d",
|
| 176 |
+
"model.language_model.layers.22.linear_attn.conv1d",
|
| 177 |
+
"model.language_model.layers.24.linear_attn.conv1d",
|
| 178 |
+
"model.language_model.layers.25.linear_attn.conv1d",
|
| 179 |
+
"model.language_model.layers.26.linear_attn.conv1d",
|
| 180 |
+
"model.language_model.layers.28.linear_attn.conv1d",
|
| 181 |
+
"model.language_model.layers.29.linear_attn.conv1d",
|
| 182 |
+
"model.language_model.layers.30.linear_attn.conv1d",
|
| 183 |
+
"model.language_model.layers.32.linear_attn.conv1d",
|
| 184 |
+
"model.language_model.layers.33.linear_attn.conv1d",
|
| 185 |
+
"model.language_model.layers.34.linear_attn.conv1d",
|
| 186 |
+
"model.language_model.layers.36.linear_attn.conv1d",
|
| 187 |
+
"model.language_model.layers.37.linear_attn.conv1d",
|
| 188 |
+
"model.language_model.layers.38.linear_attn.conv1d",
|
| 189 |
+
"model.language_model.layers.4.linear_attn.conv1d",
|
| 190 |
+
"model.language_model.layers.40.linear_attn.conv1d",
|
| 191 |
+
"model.language_model.layers.41.linear_attn.conv1d",
|
| 192 |
+
"model.language_model.layers.42.linear_attn.conv1d",
|
| 193 |
+
"model.language_model.layers.44.linear_attn.conv1d",
|
| 194 |
+
"model.language_model.layers.45.linear_attn.conv1d",
|
| 195 |
+
"model.language_model.layers.46.linear_attn.conv1d",
|
| 196 |
+
"model.language_model.layers.48.linear_attn.conv1d",
|
| 197 |
+
"model.language_model.layers.49.linear_attn.conv1d",
|
| 198 |
+
"model.language_model.layers.5.linear_attn.conv1d",
|
| 199 |
+
"model.language_model.layers.50.linear_attn.conv1d",
|
| 200 |
+
"model.language_model.layers.52.linear_attn.conv1d",
|
| 201 |
+
"model.language_model.layers.53.linear_attn.conv1d",
|
| 202 |
+
"model.language_model.layers.54.linear_attn.conv1d",
|
| 203 |
+
"model.language_model.layers.56.linear_attn.conv1d",
|
| 204 |
+
"model.language_model.layers.57.linear_attn.conv1d",
|
| 205 |
+
"model.language_model.layers.58.linear_attn.conv1d",
|
| 206 |
+
"model.language_model.layers.6.linear_attn.conv1d",
|
| 207 |
+
"model.language_model.layers.60.linear_attn.conv1d",
|
| 208 |
+
"model.language_model.layers.61.linear_attn.conv1d",
|
| 209 |
+
"model.language_model.layers.62.linear_attn.conv1d",
|
| 210 |
+
"model.language_model.layers.8.linear_attn.conv1d",
|
| 211 |
+
"model.language_model.layers.9.linear_attn.conv1d",
|
| 212 |
+
"model.visual*",
|
| 213 |
+
"mtp.fc",
|
| 214 |
+
"mtp.layers.0.input_layernorm",
|
| 215 |
+
"mtp.layers.0.mlp.down_proj",
|
| 216 |
+
"mtp.layers.0.mlp.gate_proj",
|
| 217 |
+
"mtp.layers.0.mlp.up_proj",
|
| 218 |
+
"mtp.layers.0.post_attention_layernorm",
|
| 219 |
+
"mtp.layers.0.self_attn.k_norm",
|
| 220 |
+
"mtp.layers.0.self_attn.k_proj",
|
| 221 |
+
"mtp.layers.0.self_attn.o_proj",
|
| 222 |
+
"mtp.layers.0.self_attn.q_norm",
|
| 223 |
+
"mtp.layers.0.self_attn.q_proj",
|
| 224 |
+
"mtp.layers.0.self_attn.v_proj",
|
| 225 |
+
"mtp.norm",
|
| 226 |
+
"mtp.pre_fc_norm_embedding",
|
| 227 |
+
"mtp.pre_fc_norm_hidden"
|
| 228 |
+
],
|
| 229 |
+
"quant_algo": "NVFP4",
|
| 230 |
+
"producer": {
|
| 231 |
+
"name": "modelopt",
|
| 232 |
+
"version": "0.43.0"
|
| 233 |
+
},
|
| 234 |
+
"quant_method": "modelopt"
|
| 235 |
+
}
|
| 236 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 248044,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
248046,
|
| 6 |
+
248044
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 248044,
|
| 9 |
+
"temperature": 1.0,
|
| 10 |
+
"top_k": 20,
|
| 11 |
+
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "5.5.4"
|
| 13 |
+
}
|
hf_quant_config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"producer": {
|
| 3 |
+
"name": "modelopt",
|
| 4 |
+
"version": "0.43.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.language_model.layers.0.linear_attn.conv1d",
|
| 13 |
+
"model.language_model.layers.1.linear_attn.conv1d",
|
| 14 |
+
"model.language_model.layers.10.linear_attn.conv1d",
|
| 15 |
+
"model.language_model.layers.12.linear_attn.conv1d",
|
| 16 |
+
"model.language_model.layers.13.linear_attn.conv1d",
|
| 17 |
+
"model.language_model.layers.14.linear_attn.conv1d",
|
| 18 |
+
"model.language_model.layers.16.linear_attn.conv1d",
|
| 19 |
+
"model.language_model.layers.17.linear_attn.conv1d",
|
| 20 |
+
"model.language_model.layers.18.linear_attn.conv1d",
|
| 21 |
+
"model.language_model.layers.2.linear_attn.conv1d",
|
| 22 |
+
"model.language_model.layers.20.linear_attn.conv1d",
|
| 23 |
+
"model.language_model.layers.21.linear_attn.conv1d",
|
| 24 |
+
"model.language_model.layers.22.linear_attn.conv1d",
|
| 25 |
+
"model.language_model.layers.24.linear_attn.conv1d",
|
| 26 |
+
"model.language_model.layers.25.linear_attn.conv1d",
|
| 27 |
+
"model.language_model.layers.26.linear_attn.conv1d",
|
| 28 |
+
"model.language_model.layers.28.linear_attn.conv1d",
|
| 29 |
+
"model.language_model.layers.29.linear_attn.conv1d",
|
| 30 |
+
"model.language_model.layers.30.linear_attn.conv1d",
|
| 31 |
+
"model.language_model.layers.32.linear_attn.conv1d",
|
| 32 |
+
"model.language_model.layers.33.linear_attn.conv1d",
|
| 33 |
+
"model.language_model.layers.34.linear_attn.conv1d",
|
| 34 |
+
"model.language_model.layers.36.linear_attn.conv1d",
|
| 35 |
+
"model.language_model.layers.37.linear_attn.conv1d",
|
| 36 |
+
"model.language_model.layers.38.linear_attn.conv1d",
|
| 37 |
+
"model.language_model.layers.4.linear_attn.conv1d",
|
| 38 |
+
"model.language_model.layers.40.linear_attn.conv1d",
|
| 39 |
+
"model.language_model.layers.41.linear_attn.conv1d",
|
| 40 |
+
"model.language_model.layers.42.linear_attn.conv1d",
|
| 41 |
+
"model.language_model.layers.44.linear_attn.conv1d",
|
| 42 |
+
"model.language_model.layers.45.linear_attn.conv1d",
|
| 43 |
+
"model.language_model.layers.46.linear_attn.conv1d",
|
| 44 |
+
"model.language_model.layers.48.linear_attn.conv1d",
|
| 45 |
+
"model.language_model.layers.49.linear_attn.conv1d",
|
| 46 |
+
"model.language_model.layers.5.linear_attn.conv1d",
|
| 47 |
+
"model.language_model.layers.50.linear_attn.conv1d",
|
| 48 |
+
"model.language_model.layers.52.linear_attn.conv1d",
|
| 49 |
+
"model.language_model.layers.53.linear_attn.conv1d",
|
| 50 |
+
"model.language_model.layers.54.linear_attn.conv1d",
|
| 51 |
+
"model.language_model.layers.56.linear_attn.conv1d",
|
| 52 |
+
"model.language_model.layers.57.linear_attn.conv1d",
|
| 53 |
+
"model.language_model.layers.58.linear_attn.conv1d",
|
| 54 |
+
"model.language_model.layers.6.linear_attn.conv1d",
|
| 55 |
+
"model.language_model.layers.60.linear_attn.conv1d",
|
| 56 |
+
"model.language_model.layers.61.linear_attn.conv1d",
|
| 57 |
+
"model.language_model.layers.62.linear_attn.conv1d",
|
| 58 |
+
"model.language_model.layers.8.linear_attn.conv1d",
|
| 59 |
+
"model.language_model.layers.9.linear_attn.conv1d",
|
| 60 |
+
"model.visual*"
|
| 61 |
+
]
|
| 62 |
+
}
|
| 63 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b213dc5d299dbb62da1a58ff0e90370cae392de0b4ae48d7ba023323c8992b5
|
| 3 |
+
size 20559273880
|
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:128d23d7eac9325f73bc0e8c145dfb0ecac6230d455e80ab95423184e262f101
|
| 3 |
+
size 19989442
|
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 |
+
}
|
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 |
+
}
|