Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +159 -0
- chat_template.jinja +154 -0
- config.json +473 -0
- model/model/language_model/embed_tokens/embedding/.zarray +1 -0
- model/model/language_model/layers/0/input_layernorm/kernel/.zarray +1 -0
- model/model/language_model/layers/0/input_layernorm/kernel/0 +0 -0
- model/model/language_model/layers/0/linear_attn/A_log/.zarray +1 -0
- model/model/language_model/layers/0/linear_attn/A_log/0 +0 -0
- model/model/language_model/layers/0/linear_attn/conv1d/kernel/.zarray +1 -0
- model/model/language_model/layers/0/linear_attn/conv1d/kernel/0.0.0 +0 -0
- model/model/language_model/layers/0/linear_attn/dt_bias/.zarray +1 -0
- model/model/language_model/layers/0/linear_attn/dt_bias/0 +0 -0
- model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/.zarray +1 -0
- model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/0.0 +0 -0
- model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/1.0 +0 -0
- model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/2.0 +0 -0
- model/model/language_model/layers/0/linear_attn/in_proj_b/kernel/1.0 +0 -0
- model/model/language_model/layers/0/linear_attn/in_proj_b/kernel/2.0 +0 -0
- model/model/language_model/layers/19/input_layernorm/kernel/0 +0 -0
- model/model/language_model/layers/19/post_attention_layernorm/kernel/.zarray +1 -0
- model/model/language_model/layers/19/self_attn/k_proj/kernel/.zarray +1 -0
- model/model/language_model/layers/19/self_attn/q_norm/kernel/.zarray +1 -0
- model/model/language_model/layers/19/self_attn/v_proj/kernel/.zarray +1 -0
- model/model/language_model/layers/2/input_layernorm/kernel/.zarray +1 -0
- model/model/language_model/layers/2/input_layernorm/kernel/0 +0 -0
- model/model/language_model/layers/2/linear_attn/conv1d/kernel/.zarray +1 -0
- model/model/language_model/layers/2/linear_attn/dt_bias/0 +0 -0
- model/model/language_model/layers/2/linear_attn/in_proj_a/kernel/3.0 +0 -0
- model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/.zarray +1 -0
- model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/0.0 +0 -0
- model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/1.0 +0 -0
- model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/3.0 +0 -0
- model/model/language_model/layers/2/linear_attn/in_proj_z/kernel/.zarray +1 -0
- model/model/language_model/layers/2/linear_attn/norm/kernel/0 +0 -0
- model/model/language_model/layers/2/mlp/down_proj/kernel/.zarray +1 -0
- model/model/language_model/layers/2/mlp/up_proj/kernel/.zarray +1 -0
- model/model/language_model/layers/2/post_attention_layernorm/kernel/.zarray +1 -0
- model/model/language_model/layers/2/post_attention_layernorm/kernel/0 +0 -0
- model/model/language_model/layers/20/input_layernorm/kernel/.zarray +1 -0
- model/model/language_model/layers/20/input_layernorm/kernel/0 +0 -0
- model/model/language_model/layers/20/linear_attn/A_log/.zarray +1 -0
- model/model/language_model/layers/20/linear_attn/A_log/0 +0 -0
- model/model/language_model/layers/20/linear_attn/conv1d/kernel/.zarray +1 -0
- model/model/language_model/layers/20/linear_attn/conv1d/kernel/0.0.0 +0 -0
- model/model/language_model/layers/20/linear_attn/dt_bias/.zarray +1 -0
- model/model/language_model/layers/20/linear_attn/dt_bias/0 +0 -0
- model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/.zarray +1 -0
- model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/1.0 +0 -0
- model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/2.0 +0 -0
- model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/3.0 +0 -0
README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: easydel
|
| 3 |
+
pipeline_tag: image-to-text
|
| 4 |
+
tags:
|
| 5 |
+
- easydel
|
| 6 |
+
- jax
|
| 7 |
+
- "qwen3_5"
|
| 8 |
+
- "ImageTextToText"
|
| 9 |
+
- "vanilla"
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
<p align="center">
|
| 13 |
+
<img alt="EasyDeL" src="https://raw.githubusercontent.com/erfanzar/easydel/main/images/easydel-logo-with-text.png" height="80">
|
| 14 |
+
</p>
|
| 15 |
+
|
| 16 |
+
<h1 align="center">Qwen/Qwen3.5-0.8B-Base</h1>
|
| 17 |
+
|
| 18 |
+
<div align="center">
|
| 19 |
+
EasyDeL checkpoint converted from Qwen/Qwen3.5-0.8B-Base.
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
## Overview
|
| 23 |
+
|
| 24 |
+
This checkpoint is intended to be loaded with EasyDeL on JAX (CPU/GPU/TPU). It supports sharded loading with `auto_shard_model=True` and configurable precision via `dtype`, `param_dtype`, and `precision`.
|
| 25 |
+
|
| 26 |
+
## Quickstart
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
import easydel as ed
|
| 30 |
+
from jax import numpy as jnp, lax
|
| 31 |
+
|
| 32 |
+
repo_id = "/dev/shm/conv/Qwen3.5-0.8B-Base"
|
| 33 |
+
|
| 34 |
+
dtype = jnp.bfloat16 # try jnp.float16 on many GPUs
|
| 35 |
+
|
| 36 |
+
model = ed.AutoEasyDeLModelForImageTextToText.from_pretrained(
|
| 37 |
+
repo_id,
|
| 38 |
+
dtype=dtype,
|
| 39 |
+
param_dtype=dtype,
|
| 40 |
+
precision=lax.Precision("fastest"),
|
| 41 |
+
sharding_axis_names=("dp", "fsdp", "ep", "tp", "sp"),
|
| 42 |
+
sharding_axis_dims=(1, -1, 1, 1, 1),
|
| 43 |
+
config_kwargs=ed.EasyDeLBaseConfigDict(
|
| 44 |
+
attn_dtype=dtype,
|
| 45 |
+
attn_mechanism=ed.AttentionMechanisms.VANILLA,
|
| 46 |
+
fsdp_is_ep_bound=True,
|
| 47 |
+
sp_is_ep_bound=True,
|
| 48 |
+
moe_method=ed.MoEMethods.FUSED_MOE,
|
| 49 |
+
),
|
| 50 |
+
auto_shard_model=True,
|
| 51 |
+
partition_axis=ed.PartitionAxis(),
|
| 52 |
+
)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
If the repository only provides PyTorch weights, pass `from_torch=True` to `from_pretrained(...)`.
|
| 56 |
+
|
| 57 |
+
## Sharding & Parallelism (Multi-Device)
|
| 58 |
+
|
| 59 |
+
EasyDeL can scale to multiple devices by creating a logical device mesh. Most EasyDeL loaders use a 5D mesh:
|
| 60 |
+
|
| 61 |
+
- `dp`: data parallel (replicated parameters, different batch shards)
|
| 62 |
+
- `fsdp`: parameter sharding (memory saver; often the biggest axis)
|
| 63 |
+
- `ep`: expert parallel (MoE; keep `1` for non-MoE models)
|
| 64 |
+
- `tp`: tensor parallel (splits large matmuls)
|
| 65 |
+
- `sp`: sequence parallel (splits sequence dimension)
|
| 66 |
+
|
| 67 |
+
Use `sharding_axis_names=("dp","fsdp","ep","tp","sp")` and choose `sharding_axis_dims` so that their product equals your device count.
|
| 68 |
+
You can use `-1` in `sharding_axis_dims` to let EasyDeL infer the remaining dimension.
|
| 69 |
+
|
| 70 |
+
<details>
|
| 71 |
+
<summary>Example sharding configs</summary>
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
# 8 devices, pure FSDP
|
| 75 |
+
sharding_axis_dims = (1, 8, 1, 1, 1)
|
| 76 |
+
|
| 77 |
+
# 8 devices, 2-way DP x 4-way FSDP
|
| 78 |
+
sharding_axis_dims = (2, 4, 1, 1, 1)
|
| 79 |
+
|
| 80 |
+
# 8 devices, 4-way FSDP x 2-way TP
|
| 81 |
+
sharding_axis_dims = (1, 4, 1, 2, 1)
|
| 82 |
+
```
|
| 83 |
+
</details>
|
| 84 |
+
|
| 85 |
+
## Using via `eLargeModel` (ELM)
|
| 86 |
+
|
| 87 |
+
`eLargeModel` is a higher-level interface that wires together loading, sharding, training, and eSurge inference from a single config.
|
| 88 |
+
|
| 89 |
+
```python
|
| 90 |
+
from easydel import eLargeModel
|
| 91 |
+
|
| 92 |
+
repo_id = "/dev/shm/conv/Qwen3.5-0.8B-Base"
|
| 93 |
+
|
| 94 |
+
elm = eLargeModel.from_pretrained(repo_id) # task is auto-detected
|
| 95 |
+
elm.set_dtype("bf16")
|
| 96 |
+
elm.set_sharding(axis_names=("dp", "fsdp", "ep", "tp", "sp"), axis_dims=(1, -1, 1, 1, 1))
|
| 97 |
+
|
| 98 |
+
model = elm.build_model()
|
| 99 |
+
# Optional: build an inference engine
|
| 100 |
+
# engine = elm.build_esurge()
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
<details>
|
| 104 |
+
<summary>ELM YAML config example</summary>
|
| 105 |
+
|
| 106 |
+
```yaml
|
| 107 |
+
model:
|
| 108 |
+
name_or_path: "/dev/shm/conv/Qwen3.5-0.8B-Base"
|
| 109 |
+
|
| 110 |
+
loader:
|
| 111 |
+
dtype: bf16
|
| 112 |
+
param_dtype: bf16
|
| 113 |
+
|
| 114 |
+
sharding:
|
| 115 |
+
axis_dims: [1, -1, 1, 1, 1]
|
| 116 |
+
auto_shard_model: true
|
| 117 |
+
```
|
| 118 |
+
</details>
|
| 119 |
+
|
| 120 |
+
## Features
|
| 121 |
+
|
| 122 |
+
**EasyDeL:**
|
| 123 |
+
- JAX native implementation and sharded execution
|
| 124 |
+
- Configurable attention backends via `AttentionMechanisms.*`
|
| 125 |
+
- Precision control via `dtype`, `param_dtype`, and `precision`
|
| 126 |
+
|
| 127 |
+
## Installation
|
| 128 |
+
|
| 129 |
+
```bash
|
| 130 |
+
pip install easydel
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
## Links
|
| 134 |
+
|
| 135 |
+
- EasyDeL GitHub: https://github.com/erfanzar/EasyDeL
|
| 136 |
+
- Docs: https://easydel.readthedocs.io/en/latest/
|
| 137 |
+
|
| 138 |
+
## Supported Tasks
|
| 139 |
+
|
| 140 |
+
- ImageTextToText
|
| 141 |
+
|
| 142 |
+
## Limitations
|
| 143 |
+
|
| 144 |
+
- Refer to the original model card for training data, evaluation, and intended use.
|
| 145 |
+
|
| 146 |
+
## License
|
| 147 |
+
|
| 148 |
+
EasyDeL is released under the Apache-2.0 license. The license for this model's weights may differ; please consult the original repository.
|
| 149 |
+
|
| 150 |
+
## Citation
|
| 151 |
+
|
| 152 |
+
```bibtex
|
| 153 |
+
@misc{Zare Chavoshi_2023,
|
| 154 |
+
title={EasyDeL: An open-source library for enhancing and streamlining the training process of machine learning models},
|
| 155 |
+
url={https://github.com/erfanzar/EasyDeL},
|
| 156 |
+
author={Zare Chavoshi, Erfan},
|
| 157 |
+
year={2023}
|
| 158 |
+
}
|
| 159 |
+
```
|
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 true %}
|
| 150 |
+
{{- '<think>\n' }}
|
| 151 |
+
{%- else %}
|
| 152 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 153 |
+
{%- endif %}
|
| 154 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_external_rope_config_kwargs": {},
|
| 3 |
+
"add_cross_attention": false,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"Qwen3_5ForConditionalGeneration"
|
| 6 |
+
],
|
| 7 |
+
"attn_mechanism": "vanilla",
|
| 8 |
+
"backend": null,
|
| 9 |
+
"bits": null,
|
| 10 |
+
"blocksize_b": 1,
|
| 11 |
+
"blocksize_k": 512,
|
| 12 |
+
"blocksize_q": 512,
|
| 13 |
+
"bos_token_id": null,
|
| 14 |
+
"cross_attention_hidden_size": null,
|
| 15 |
+
"decode_attn_mechanism": null,
|
| 16 |
+
"decoder_start_token_id": null,
|
| 17 |
+
"easy_method": "train",
|
| 18 |
+
"eos_token_id": null,
|
| 19 |
+
"fcm_max_ratio": 0.0,
|
| 20 |
+
"fcm_min_ratio": 0.0,
|
| 21 |
+
"flash_attention_backward_pass_impl": "triton",
|
| 22 |
+
"fsdp_is_ep_bound": true,
|
| 23 |
+
"gradient_checkpointing": "",
|
| 24 |
+
"gradient_checkpointing_targets": null,
|
| 25 |
+
"hardware_abstraction": false,
|
| 26 |
+
"image_token_id": 248056,
|
| 27 |
+
"is_decoder": false,
|
| 28 |
+
"kv_cache_quantization_config": null,
|
| 29 |
+
"kv_cache_sharding_sequence_axis_name": "sp",
|
| 30 |
+
"kvdtype": "bfloat16",
|
| 31 |
+
"lmhead_chunksize": null,
|
| 32 |
+
"max_position_embeddings": null,
|
| 33 |
+
"mla_attn_dtype": "bfloat16",
|
| 34 |
+
"mla_attn_mechanism": "auto",
|
| 35 |
+
"mla_attn_softmax_dtype": "float32",
|
| 36 |
+
"model_type": "qwen3_5",
|
| 37 |
+
"moe_force_xla_gmm": false,
|
| 38 |
+
"moe_method": "fused_moe",
|
| 39 |
+
"moe_tiling_size_batch": 4,
|
| 40 |
+
"moe_tiling_size_dim": 128,
|
| 41 |
+
"moe_tiling_size_seqlen": 128,
|
| 42 |
+
"operation_configs": null,
|
| 43 |
+
"pad_token_id": null,
|
| 44 |
+
"pallas_k_block_size": 128,
|
| 45 |
+
"pallas_m_block_size": 128,
|
| 46 |
+
"pallas_n_block_size": 128,
|
| 47 |
+
"partition_axis": {
|
| 48 |
+
"attention_dim_axis": null,
|
| 49 |
+
"attention_kv_dim_axis": null,
|
| 50 |
+
"batch_axis": [
|
| 51 |
+
"fsdp",
|
| 52 |
+
"dp"
|
| 53 |
+
],
|
| 54 |
+
"bias_head_sequence_axis": null,
|
| 55 |
+
"bias_key_sequence_axis": null,
|
| 56 |
+
"data_parallel_axis": "dp",
|
| 57 |
+
"decode_attention_dim_axis": null,
|
| 58 |
+
"decode_attention_kv_dim_axis": null,
|
| 59 |
+
"decode_batch_axis": [
|
| 60 |
+
"fsdp",
|
| 61 |
+
"dp"
|
| 62 |
+
],
|
| 63 |
+
"decode_head_axis": "tp",
|
| 64 |
+
"decode_key_sequence_axis": "sp",
|
| 65 |
+
"decode_kv_head_axis": "tp",
|
| 66 |
+
"decode_query_sequence_axis": null,
|
| 67 |
+
"expert_axis": "ep",
|
| 68 |
+
"expert_gate_axis": null,
|
| 69 |
+
"expert_parallel_axis": "ep",
|
| 70 |
+
"fully_sharded_data_parallel_axis": "fsdp",
|
| 71 |
+
"head_axis": "tp",
|
| 72 |
+
"hidden_state_axis": "tp",
|
| 73 |
+
"key_sequence_axis": "sp",
|
| 74 |
+
"kv_head_axis": "tp",
|
| 75 |
+
"mlp_intermediate_axis": "tp",
|
| 76 |
+
"query_sequence_axis": "sp",
|
| 77 |
+
"sequence_axis": "sp",
|
| 78 |
+
"sequence_parallel_axis": "sp",
|
| 79 |
+
"tensor_parallel_axis": "tp",
|
| 80 |
+
"vocab_axis": "tp"
|
| 81 |
+
},
|
| 82 |
+
"platform": null,
|
| 83 |
+
"precompute_masks": true,
|
| 84 |
+
"pretraining_tp": 1,
|
| 85 |
+
"qmm_platform_override": null,
|
| 86 |
+
"qmm_tpu_path_override": null,
|
| 87 |
+
"quantization_config": null,
|
| 88 |
+
"scan_attention_layers": false,
|
| 89 |
+
"scan_mlp_chunk_size": 1024,
|
| 90 |
+
"scan_ring_attention": true,
|
| 91 |
+
"sep_token_id": null,
|
| 92 |
+
"sequence_axis_name": "sp",
|
| 93 |
+
"sharding_axis_dims": [
|
| 94 |
+
1,
|
| 95 |
+
-1,
|
| 96 |
+
1,
|
| 97 |
+
1,
|
| 98 |
+
1
|
| 99 |
+
],
|
| 100 |
+
"sharding_axis_names": [
|
| 101 |
+
"dp",
|
| 102 |
+
"fsdp",
|
| 103 |
+
"ep",
|
| 104 |
+
"tp",
|
| 105 |
+
"sp"
|
| 106 |
+
],
|
| 107 |
+
"sharding_dcn_axis_dims": null,
|
| 108 |
+
"sp_is_ep_bound": true,
|
| 109 |
+
"text_config": {
|
| 110 |
+
"_external_rope_config_kwargs": {},
|
| 111 |
+
"add_cross_attention": false,
|
| 112 |
+
"architectures": [
|
| 113 |
+
"Qwen3_5ForConditionalGeneration"
|
| 114 |
+
],
|
| 115 |
+
"attention_bias": false,
|
| 116 |
+
"attention_dropout": 0.0,
|
| 117 |
+
"attn_dtype": "bfloat16",
|
| 118 |
+
"attn_mechanism": "vanilla",
|
| 119 |
+
"attn_output_gate": true,
|
| 120 |
+
"attn_softmax_dtype": "float32",
|
| 121 |
+
"backend": null,
|
| 122 |
+
"bits": null,
|
| 123 |
+
"blocksize_b": 1,
|
| 124 |
+
"blocksize_k": 512,
|
| 125 |
+
"blocksize_q": 512,
|
| 126 |
+
"bos_token_id": null,
|
| 127 |
+
"cross_attention_hidden_size": null,
|
| 128 |
+
"decode_attn_mechanism": null,
|
| 129 |
+
"decoder_sparse_step": 1,
|
| 130 |
+
"decoder_start_token_id": null,
|
| 131 |
+
"dtype": "bfloat16",
|
| 132 |
+
"easy_method": "train",
|
| 133 |
+
"eos_token_id": 248044,
|
| 134 |
+
"fcm_max_ratio": 0.0,
|
| 135 |
+
"fcm_min_ratio": 0.0,
|
| 136 |
+
"flash_attention_backward_pass_impl": "triton",
|
| 137 |
+
"fsdp_is_ep_bound": true,
|
| 138 |
+
"full_attention_interval": 4,
|
| 139 |
+
"gradient_checkpointing": "",
|
| 140 |
+
"gradient_checkpointing_targets": null,
|
| 141 |
+
"hardware_abstraction": false,
|
| 142 |
+
"head_dim": 256,
|
| 143 |
+
"hidden_act": "silu",
|
| 144 |
+
"hidden_size": 1024,
|
| 145 |
+
"initializer_range": 0.02,
|
| 146 |
+
"intermediate_size": 3584,
|
| 147 |
+
"is_decoder": false,
|
| 148 |
+
"kv_cache_quantization_config": null,
|
| 149 |
+
"kv_cache_sharding_sequence_axis_name": "sp",
|
| 150 |
+
"kvdtype": "bfloat16",
|
| 151 |
+
"layer_types": [
|
| 152 |
+
"linear_attention",
|
| 153 |
+
"linear_attention",
|
| 154 |
+
"linear_attention",
|
| 155 |
+
"full_attention",
|
| 156 |
+
"linear_attention",
|
| 157 |
+
"linear_attention",
|
| 158 |
+
"linear_attention",
|
| 159 |
+
"full_attention",
|
| 160 |
+
"linear_attention",
|
| 161 |
+
"linear_attention",
|
| 162 |
+
"linear_attention",
|
| 163 |
+
"full_attention",
|
| 164 |
+
"linear_attention",
|
| 165 |
+
"linear_attention",
|
| 166 |
+
"linear_attention",
|
| 167 |
+
"full_attention",
|
| 168 |
+
"linear_attention",
|
| 169 |
+
"linear_attention",
|
| 170 |
+
"linear_attention",
|
| 171 |
+
"full_attention",
|
| 172 |
+
"linear_attention",
|
| 173 |
+
"linear_attention",
|
| 174 |
+
"linear_attention",
|
| 175 |
+
"full_attention"
|
| 176 |
+
],
|
| 177 |
+
"linear_attention_separate_proj": true,
|
| 178 |
+
"linear_conv_kernel_dim": 4,
|
| 179 |
+
"linear_key_head_dim": 128,
|
| 180 |
+
"linear_num_key_heads": 16,
|
| 181 |
+
"linear_num_value_heads": 16,
|
| 182 |
+
"linear_value_head_dim": 128,
|
| 183 |
+
"lmhead_chunksize": null,
|
| 184 |
+
"mamba_ssm_dtype": "float32",
|
| 185 |
+
"max_position_embeddings": 262144,
|
| 186 |
+
"mla_attn_dtype": "bfloat16",
|
| 187 |
+
"mla_attn_mechanism": "auto",
|
| 188 |
+
"mla_attn_softmax_dtype": "float32",
|
| 189 |
+
"mlp_only_layers": [
|
| 190 |
+
0,
|
| 191 |
+
1,
|
| 192 |
+
2,
|
| 193 |
+
3,
|
| 194 |
+
4,
|
| 195 |
+
5,
|
| 196 |
+
6,
|
| 197 |
+
7,
|
| 198 |
+
8,
|
| 199 |
+
9,
|
| 200 |
+
10,
|
| 201 |
+
11,
|
| 202 |
+
12,
|
| 203 |
+
13,
|
| 204 |
+
14,
|
| 205 |
+
15,
|
| 206 |
+
16,
|
| 207 |
+
17,
|
| 208 |
+
18,
|
| 209 |
+
19,
|
| 210 |
+
20,
|
| 211 |
+
21,
|
| 212 |
+
22,
|
| 213 |
+
23
|
| 214 |
+
],
|
| 215 |
+
"model_type": "qwen3_5_text",
|
| 216 |
+
"moe_force_xla_gmm": false,
|
| 217 |
+
"moe_intermediate_size": 512,
|
| 218 |
+
"moe_method": "fused_moe",
|
| 219 |
+
"moe_tiling_size_batch": 4,
|
| 220 |
+
"moe_tiling_size_dim": 128,
|
| 221 |
+
"moe_tiling_size_seqlen": 128,
|
| 222 |
+
"mtp_num_hidden_layers": 1,
|
| 223 |
+
"mtp_use_dedicated_embeddings": false,
|
| 224 |
+
"norm_topk_prob": true,
|
| 225 |
+
"num_attention_heads": 8,
|
| 226 |
+
"num_experts": 256,
|
| 227 |
+
"num_experts_per_tok": 8,
|
| 228 |
+
"num_hidden_layers": 24,
|
| 229 |
+
"num_key_value_heads": 2,
|
| 230 |
+
"num_local_experts": 256,
|
| 231 |
+
"operation_configs": null,
|
| 232 |
+
"output_router_logits": false,
|
| 233 |
+
"pad_token_id": null,
|
| 234 |
+
"pallas_k_block_size": 128,
|
| 235 |
+
"pallas_m_block_size": 128,
|
| 236 |
+
"pallas_n_block_size": 128,
|
| 237 |
+
"partial_rotary_factor": 0.25,
|
| 238 |
+
"partition_axis": {
|
| 239 |
+
"attention_dim_axis": null,
|
| 240 |
+
"attention_kv_dim_axis": null,
|
| 241 |
+
"batch_axis": [
|
| 242 |
+
"fsdp",
|
| 243 |
+
"dp"
|
| 244 |
+
],
|
| 245 |
+
"bias_head_sequence_axis": null,
|
| 246 |
+
"bias_key_sequence_axis": null,
|
| 247 |
+
"data_parallel_axis": "dp",
|
| 248 |
+
"decode_attention_dim_axis": null,
|
| 249 |
+
"decode_attention_kv_dim_axis": null,
|
| 250 |
+
"decode_batch_axis": [
|
| 251 |
+
"fsdp",
|
| 252 |
+
"dp"
|
| 253 |
+
],
|
| 254 |
+
"decode_head_axis": "tp",
|
| 255 |
+
"decode_key_sequence_axis": "sp",
|
| 256 |
+
"decode_kv_head_axis": "tp",
|
| 257 |
+
"decode_query_sequence_axis": null,
|
| 258 |
+
"expert_axis": "ep",
|
| 259 |
+
"expert_gate_axis": null,
|
| 260 |
+
"expert_parallel_axis": "ep",
|
| 261 |
+
"fully_sharded_data_parallel_axis": "fsdp",
|
| 262 |
+
"head_axis": "tp",
|
| 263 |
+
"hidden_state_axis": "tp",
|
| 264 |
+
"key_sequence_axis": "sp",
|
| 265 |
+
"kv_head_axis": "tp",
|
| 266 |
+
"mlp_intermediate_axis": "tp",
|
| 267 |
+
"query_sequence_axis": "sp",
|
| 268 |
+
"sequence_axis": "sp",
|
| 269 |
+
"sequence_parallel_axis": "sp",
|
| 270 |
+
"tensor_parallel_axis": "tp",
|
| 271 |
+
"vocab_axis": "tp"
|
| 272 |
+
},
|
| 273 |
+
"platform": null,
|
| 274 |
+
"precompute_masks": true,
|
| 275 |
+
"pretraining_tp": 1,
|
| 276 |
+
"qmm_platform_override": null,
|
| 277 |
+
"qmm_tpu_path_override": null,
|
| 278 |
+
"quantization_config": null,
|
| 279 |
+
"rms_norm_eps": 1e-06,
|
| 280 |
+
"rope_parameters": {
|
| 281 |
+
"mrope_interleaved": true,
|
| 282 |
+
"mrope_section": [
|
| 283 |
+
11,
|
| 284 |
+
11,
|
| 285 |
+
10
|
| 286 |
+
],
|
| 287 |
+
"partial_rotary_factor": 0.25,
|
| 288 |
+
"rope_theta": 10000000,
|
| 289 |
+
"rope_type": "default",
|
| 290 |
+
"type": "default"
|
| 291 |
+
},
|
| 292 |
+
"rope_theta": 10000000,
|
| 293 |
+
"router_aux_loss_coef": 0.001,
|
| 294 |
+
"scan_attention_layers": false,
|
| 295 |
+
"scan_mlp_chunk_size": 1024,
|
| 296 |
+
"scan_ring_attention": true,
|
| 297 |
+
"sep_token_id": null,
|
| 298 |
+
"sequence_axis_name": "sp",
|
| 299 |
+
"sharding_axis_dims": [
|
| 300 |
+
1,
|
| 301 |
+
-1,
|
| 302 |
+
1,
|
| 303 |
+
1,
|
| 304 |
+
1
|
| 305 |
+
],
|
| 306 |
+
"sharding_axis_names": [
|
| 307 |
+
"dp",
|
| 308 |
+
"fsdp",
|
| 309 |
+
"ep",
|
| 310 |
+
"tp",
|
| 311 |
+
"sp"
|
| 312 |
+
],
|
| 313 |
+
"sharding_dcn_axis_dims": null,
|
| 314 |
+
"shared_expert_intermediate_size": 512,
|
| 315 |
+
"sp_is_ep_bound": true,
|
| 316 |
+
"tie_encoder_decoder": false,
|
| 317 |
+
"tie_word_embeddings": true,
|
| 318 |
+
"use_cache": true,
|
| 319 |
+
"use_expert_tensor_mode": false,
|
| 320 |
+
"use_qmm_best_config": false,
|
| 321 |
+
"use_ring_of_experts": false,
|
| 322 |
+
"use_scan_mlp": false,
|
| 323 |
+
"use_sharded_kv_caching": false,
|
| 324 |
+
"use_sharding_constraint": false,
|
| 325 |
+
"vocab_size": 248320
|
| 326 |
+
},
|
| 327 |
+
"tie_encoder_decoder": false,
|
| 328 |
+
"tie_word_embeddings": true,
|
| 329 |
+
"transformers_version": "5.5.0",
|
| 330 |
+
"use_expert_tensor_mode": false,
|
| 331 |
+
"use_qmm_best_config": false,
|
| 332 |
+
"use_ring_of_experts": false,
|
| 333 |
+
"use_scan_mlp": false,
|
| 334 |
+
"use_sharded_kv_caching": false,
|
| 335 |
+
"use_sharding_constraint": false,
|
| 336 |
+
"video_token_id": 248057,
|
| 337 |
+
"vision_config": {
|
| 338 |
+
"_external_rope_config_kwargs": {},
|
| 339 |
+
"add_cross_attention": false,
|
| 340 |
+
"architectures": [
|
| 341 |
+
"Qwen3_5ForConditionalGeneration"
|
| 342 |
+
],
|
| 343 |
+
"attn_dtype": "bfloat16",
|
| 344 |
+
"attn_mechanism": "vanilla",
|
| 345 |
+
"attn_softmax_dtype": "float32",
|
| 346 |
+
"backend": null,
|
| 347 |
+
"bits": null,
|
| 348 |
+
"blocksize_b": 1,
|
| 349 |
+
"blocksize_k": 512,
|
| 350 |
+
"blocksize_q": 512,
|
| 351 |
+
"bos_token_id": null,
|
| 352 |
+
"cross_attention_hidden_size": null,
|
| 353 |
+
"decode_attn_mechanism": null,
|
| 354 |
+
"decoder_start_token_id": null,
|
| 355 |
+
"deepstack_visual_indexes": [],
|
| 356 |
+
"depth": 12,
|
| 357 |
+
"easy_method": "train",
|
| 358 |
+
"embed_dim": 768,
|
| 359 |
+
"eos_token_id": null,
|
| 360 |
+
"fcm_max_ratio": 0.0,
|
| 361 |
+
"fcm_min_ratio": 0.0,
|
| 362 |
+
"flash_attention_backward_pass_impl": "triton",
|
| 363 |
+
"fsdp_is_ep_bound": true,
|
| 364 |
+
"gradient_checkpointing": "",
|
| 365 |
+
"gradient_checkpointing_targets": null,
|
| 366 |
+
"hardware_abstraction": false,
|
| 367 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 368 |
+
"hidden_size": 768,
|
| 369 |
+
"in_channels": 3,
|
| 370 |
+
"initializer_range": 0.02,
|
| 371 |
+
"intermediate_size": 3072,
|
| 372 |
+
"is_decoder": false,
|
| 373 |
+
"kv_cache_quantization_config": null,
|
| 374 |
+
"kv_cache_sharding_sequence_axis_name": "sp",
|
| 375 |
+
"kvdtype": "bfloat16",
|
| 376 |
+
"lmhead_chunksize": null,
|
| 377 |
+
"max_position_embeddings": null,
|
| 378 |
+
"mla_attn_dtype": "bfloat16",
|
| 379 |
+
"mla_attn_mechanism": "auto",
|
| 380 |
+
"mla_attn_softmax_dtype": "float32",
|
| 381 |
+
"model_type": "qwen3_5",
|
| 382 |
+
"moe_force_xla_gmm": false,
|
| 383 |
+
"moe_method": "fused_moe",
|
| 384 |
+
"moe_tiling_size_batch": 4,
|
| 385 |
+
"moe_tiling_size_dim": 128,
|
| 386 |
+
"moe_tiling_size_seqlen": 128,
|
| 387 |
+
"num_attention_heads": 12,
|
| 388 |
+
"num_heads": 12,
|
| 389 |
+
"num_position_embeddings": 2304,
|
| 390 |
+
"operation_configs": null,
|
| 391 |
+
"out_hidden_size": 1024,
|
| 392 |
+
"pad_token_id": null,
|
| 393 |
+
"pallas_k_block_size": 128,
|
| 394 |
+
"pallas_m_block_size": 128,
|
| 395 |
+
"pallas_n_block_size": 128,
|
| 396 |
+
"partition_axis": {
|
| 397 |
+
"attention_dim_axis": null,
|
| 398 |
+
"attention_kv_dim_axis": null,
|
| 399 |
+
"batch_axis": [
|
| 400 |
+
"fsdp",
|
| 401 |
+
"dp"
|
| 402 |
+
],
|
| 403 |
+
"bias_head_sequence_axis": null,
|
| 404 |
+
"bias_key_sequence_axis": null,
|
| 405 |
+
"data_parallel_axis": "dp",
|
| 406 |
+
"decode_attention_dim_axis": null,
|
| 407 |
+
"decode_attention_kv_dim_axis": null,
|
| 408 |
+
"decode_batch_axis": [
|
| 409 |
+
"fsdp",
|
| 410 |
+
"dp"
|
| 411 |
+
],
|
| 412 |
+
"decode_head_axis": "tp",
|
| 413 |
+
"decode_key_sequence_axis": "sp",
|
| 414 |
+
"decode_kv_head_axis": "tp",
|
| 415 |
+
"decode_query_sequence_axis": null,
|
| 416 |
+
"expert_axis": "ep",
|
| 417 |
+
"expert_gate_axis": null,
|
| 418 |
+
"expert_parallel_axis": "ep",
|
| 419 |
+
"fully_sharded_data_parallel_axis": "fsdp",
|
| 420 |
+
"head_axis": "tp",
|
| 421 |
+
"hidden_state_axis": "tp",
|
| 422 |
+
"key_sequence_axis": "sp",
|
| 423 |
+
"kv_head_axis": "tp",
|
| 424 |
+
"mlp_intermediate_axis": "tp",
|
| 425 |
+
"query_sequence_axis": "sp",
|
| 426 |
+
"sequence_axis": "sp",
|
| 427 |
+
"sequence_parallel_axis": "sp",
|
| 428 |
+
"tensor_parallel_axis": "tp",
|
| 429 |
+
"vocab_axis": "tp"
|
| 430 |
+
},
|
| 431 |
+
"patch_size": 16,
|
| 432 |
+
"platform": null,
|
| 433 |
+
"precompute_masks": true,
|
| 434 |
+
"pretraining_tp": 1,
|
| 435 |
+
"qmm_platform_override": null,
|
| 436 |
+
"qmm_tpu_path_override": null,
|
| 437 |
+
"quantization_config": null,
|
| 438 |
+
"scan_attention_layers": false,
|
| 439 |
+
"scan_mlp_chunk_size": 1024,
|
| 440 |
+
"scan_ring_attention": true,
|
| 441 |
+
"sep_token_id": null,
|
| 442 |
+
"sequence_axis_name": "sp",
|
| 443 |
+
"sharding_axis_dims": [
|
| 444 |
+
1,
|
| 445 |
+
-1,
|
| 446 |
+
1,
|
| 447 |
+
1,
|
| 448 |
+
1
|
| 449 |
+
],
|
| 450 |
+
"sharding_axis_names": [
|
| 451 |
+
"dp",
|
| 452 |
+
"fsdp",
|
| 453 |
+
"ep",
|
| 454 |
+
"tp",
|
| 455 |
+
"sp"
|
| 456 |
+
],
|
| 457 |
+
"sharding_dcn_axis_dims": null,
|
| 458 |
+
"sp_is_ep_bound": true,
|
| 459 |
+
"spatial_merge_size": 2,
|
| 460 |
+
"temporal_patch_size": 2,
|
| 461 |
+
"tie_encoder_decoder": false,
|
| 462 |
+
"tie_word_embeddings": true,
|
| 463 |
+
"tokens_per_second": 2.0,
|
| 464 |
+
"use_expert_tensor_mode": false,
|
| 465 |
+
"use_qmm_best_config": false,
|
| 466 |
+
"use_ring_of_experts": false,
|
| 467 |
+
"use_scan_mlp": false,
|
| 468 |
+
"use_sharded_kv_caching": false,
|
| 469 |
+
"use_sharding_constraint": false
|
| 470 |
+
},
|
| 471 |
+
"vision_end_token_id": 248054,
|
| 472 |
+
"vision_start_token_id": 248053
|
| 473 |
+
}
|
model/model/language_model/embed_tokens/embedding/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[62080,1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[248320,1024],"zarr_format":2}
|
model/model/language_model/layers/0/input_layernorm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
|
model/model/language_model/layers/0/input_layernorm/kernel/0
ADDED
|
Binary file (1.36 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/A_log/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[16],"zarr_format":2}
|
model/model/language_model/layers/0/linear_attn/A_log/0
ADDED
|
Binary file (41 Bytes). View file
|
|
|
model/model/language_model/layers/0/linear_attn/conv1d/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[4,1,6144],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4,1,6144],"zarr_format":2}
|
model/model/language_model/layers/0/linear_attn/conv1d/kernel/0.0.0
ADDED
|
Binary file (41.3 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/dt_bias/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[16],"zarr_format":2}
|
model/model/language_model/layers/0/linear_attn/dt_bias/0
ADDED
|
Binary file (41 Bytes). View file
|
|
|
model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,16],"zarr_format":2}
|
model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/0.0
ADDED
|
Binary file (6.45 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/1.0
ADDED
|
Binary file (6.46 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/in_proj_a/kernel/2.0
ADDED
|
Binary file (6.49 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/in_proj_b/kernel/1.0
ADDED
|
Binary file (6.49 kB). View file
|
|
|
model/model/language_model/layers/0/linear_attn/in_proj_b/kernel/2.0
ADDED
|
Binary file (6.48 kB). View file
|
|
|
model/model/language_model/layers/19/input_layernorm/kernel/0
ADDED
|
Binary file (1.44 kB). View file
|
|
|
model/model/language_model/layers/19/post_attention_layernorm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
|
model/model/language_model/layers/19/self_attn/k_proj/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,512],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,512],"zarr_format":2}
|
model/model/language_model/layers/19/self_attn/q_norm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[256],"zarr_format":2}
|
model/model/language_model/layers/19/self_attn/v_proj/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,512],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,512],"zarr_format":2}
|
model/model/language_model/layers/2/input_layernorm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
|
model/model/language_model/layers/2/input_layernorm/kernel/0
ADDED
|
Binary file (1.38 kB). View file
|
|
|
model/model/language_model/layers/2/linear_attn/conv1d/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[4,1,6144],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4,1,6144],"zarr_format":2}
|
model/model/language_model/layers/2/linear_attn/dt_bias/0
ADDED
|
Binary file (41 Bytes). View file
|
|
|
model/model/language_model/layers/2/linear_attn/in_proj_a/kernel/3.0
ADDED
|
Binary file (6.48 kB). View file
|
|
|
model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,16],"zarr_format":2}
|
model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/0.0
ADDED
|
Binary file (6.51 kB). View file
|
|
|
model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/1.0
ADDED
|
Binary file (6.46 kB). View file
|
|
|
model/model/language_model/layers/2/linear_attn/in_proj_b/kernel/3.0
ADDED
|
Binary file (6.49 kB). View file
|
|
|
model/model/language_model/layers/2/linear_attn/in_proj_z/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,2048],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,2048],"zarr_format":2}
|
model/model/language_model/layers/2/linear_attn/norm/kernel/0
ADDED
|
Binary file (180 Bytes). View file
|
|
|
model/model/language_model/layers/2/mlp/down_proj/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[3584,256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[3584,1024],"zarr_format":2}
|
model/model/language_model/layers/2/mlp/up_proj/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,3584],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,3584],"zarr_format":2}
|
model/model/language_model/layers/2/post_attention_layernorm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
|
model/model/language_model/layers/2/post_attention_layernorm/kernel/0
ADDED
|
Binary file (1.29 kB). View file
|
|
|
model/model/language_model/layers/20/input_layernorm/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
|
model/model/language_model/layers/20/input_layernorm/kernel/0
ADDED
|
Binary file (1.14 kB). View file
|
|
|
model/model/language_model/layers/20/linear_attn/A_log/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[16],"zarr_format":2}
|
model/model/language_model/layers/20/linear_attn/A_log/0
ADDED
|
Binary file (41 Bytes). View file
|
|
|
model/model/language_model/layers/20/linear_attn/conv1d/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[4,1,6144],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4,1,6144],"zarr_format":2}
|
model/model/language_model/layers/20/linear_attn/conv1d/kernel/0.0.0
ADDED
|
Binary file (41 kB). View file
|
|
|
model/model/language_model/layers/20/linear_attn/dt_bias/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[16],"zarr_format":2}
|
model/model/language_model/layers/20/linear_attn/dt_bias/0
ADDED
|
Binary file (41 Bytes). View file
|
|
|
model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/.zarray
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"chunks":[256,16],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,16],"zarr_format":2}
|
model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/1.0
ADDED
|
Binary file (6.48 kB). View file
|
|
|
model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/2.0
ADDED
|
Binary file (6.48 kB). View file
|
|
|
model/model/language_model/layers/20/linear_attn/in_proj_a/kernel/3.0
ADDED
|
Binary file (6.47 kB). View file
|
|
|