Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +58 -0
- config.json +125 -0
- model.safetensors-00001-of-00014.safetensors +3 -0
- model.safetensors-00002-of-00014.safetensors +3 -0
- model.safetensors-00003-of-00014.safetensors +3 -0
- model.safetensors-00004-of-00014.safetensors +3 -0
- model.safetensors-00005-of-00014.safetensors +3 -0
- model.safetensors-00006-of-00014.safetensors +3 -0
- model.safetensors-00007-of-00014.safetensors +3 -0
- model.safetensors-00008-of-00014.safetensors +3 -0
- model.safetensors-00009-of-00014.safetensors +3 -0
- model.safetensors-00010-of-00014.safetensors +3 -0
- model.safetensors-00011-of-00014.safetensors +3 -0
- model.safetensors-00012-of-00014.safetensors +3 -0
- model.safetensors-00013-of-00014.safetensors +3 -0
- model.safetensors-00014-of-00014.safetensors +3 -0
- model.safetensors.index.json +0 -0
- processor_config.json +63 -0
- tokenizer.json +3 -0
- tokenizer_config.json +34 -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,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3.5-35B-A3B-Base
|
| 4 |
+
tags:
|
| 5 |
+
- lora
|
| 6 |
+
- fine-tuned
|
| 7 |
+
- tool-calling
|
| 8 |
+
- mcp
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# ecu-pilot
|
| 12 |
+
|
| 13 |
+
A fine-tuned Qwen3.5-35B-A3B for tool calling against a certain popular data transformation framework that shall remain unnamed (but whose initials, shifted back by one letter, might ring a bell).
|
| 14 |
+
|
| 15 |
+
This model was trained to call 9 MCP tools that query project metadata — things like lineage traversal, impact analysis, test coverage, and schema introspection. It knows when to call them, what arguments to pass, and how to synthesize the results into something a data engineer would actually find helpful.
|
| 16 |
+
|
| 17 |
+
## What it does
|
| 18 |
+
|
| 19 |
+
You ask it about your project. It thinks about which tools to use. It calls them. It gives you an answer.
|
| 20 |
+
|
| 21 |
+
```
|
| 22 |
+
> "What's the blast radius of changing stg_orders?"
|
| 23 |
+
|
| 24 |
+
<think>
|
| 25 |
+
Goal: pre-refactor impact analysis
|
| 26 |
+
Tools: node, impact, report
|
| 27 |
+
</think>
|
| 28 |
+
|
| 29 |
+
→ calls 3 tools
|
| 30 |
+
→ "Affects 3 downstream models. Orders has 5 tests including financial validation."
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## Training details
|
| 34 |
+
|
| 35 |
+
- **Base model**: Qwen3.5-35B-A3B-Base (MoE — 35B total, 3B active per token)
|
| 36 |
+
- **Method**: bf16 LoRA (r=16, alpha=16) — not QLoRA, because MoE expert routing deserves respect
|
| 37 |
+
- **Curriculum**: Two-stage SFT adapted from the Thinkquel methodology
|
| 38 |
+
- Stage 1: tool-calling mechanics (1 epoch, 1,206 examples)
|
| 39 |
+
- Stage 2: structured planning (2 epochs, 290 examples)
|
| 40 |
+
- **Hardware**: NVIDIA H200 (141 GB). One GPU. One hour.
|
| 41 |
+
- **Training data**: 1,206 examples with real tool responses from a real project index. Nothing hallucinated.
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 47 |
+
|
| 48 |
+
model = AutoModelForCausalLM.from_pretrained(mach-kernel/ecu-pilot-fp16, torch_dtype=bfloat16)
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained(mach-kernel/ecu-pilot-fp16)
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## LoRA adapter
|
| 53 |
+
|
| 54 |
+
If you'd rather merge it yourself: [mach-kernel/ecu-pilot-fp16-lora](https://huggingface.co/mach-kernel/ecu-pilot-fp16-lora)
|
| 55 |
+
|
| 56 |
+
## Why "ecu"
|
| 57 |
+
|
| 58 |
+
No reason. Just liked how it sounded. Definitely not a Caesar cipher of anything. Don't look into it.
|
config.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3_5MoeForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"torch_dtype": "bfloat16",
|
| 6 |
+
"image_token_id": 248056,
|
| 7 |
+
"model_name": "unsloth/Qwen3.5-35B-A3B-Base",
|
| 8 |
+
"model_type": "qwen3_5_moe",
|
| 9 |
+
"pad_token_id": 248055,
|
| 10 |
+
"text_config": {
|
| 11 |
+
"attention_bias": false,
|
| 12 |
+
"attention_dropout": 0.0,
|
| 13 |
+
"attn_output_gate": true,
|
| 14 |
+
"bos_token_id": null,
|
| 15 |
+
"torch_dtype": "bfloat16",
|
| 16 |
+
"eos_token_id": 248044,
|
| 17 |
+
"full_attention_interval": 4,
|
| 18 |
+
"head_dim": 256,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 2048,
|
| 21 |
+
"initializer_range": 0.02,
|
| 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 |
+
],
|
| 64 |
+
"linear_conv_kernel_dim": 4,
|
| 65 |
+
"linear_key_head_dim": 128,
|
| 66 |
+
"linear_num_key_heads": 16,
|
| 67 |
+
"linear_num_value_heads": 32,
|
| 68 |
+
"linear_value_head_dim": 128,
|
| 69 |
+
"mamba_ssm_dtype": "float32",
|
| 70 |
+
"max_position_embeddings": 262144,
|
| 71 |
+
"mlp_only_layers": [],
|
| 72 |
+
"model_type": "qwen3_5_moe_text",
|
| 73 |
+
"moe_intermediate_size": 512,
|
| 74 |
+
"mtp_num_hidden_layers": 1,
|
| 75 |
+
"mtp_use_dedicated_embeddings": false,
|
| 76 |
+
"num_attention_heads": 16,
|
| 77 |
+
"num_experts": 256,
|
| 78 |
+
"num_experts_per_tok": 8,
|
| 79 |
+
"num_hidden_layers": 40,
|
| 80 |
+
"num_key_value_heads": 2,
|
| 81 |
+
"output_router_logits": false,
|
| 82 |
+
"pad_token_id": null,
|
| 83 |
+
"partial_rotary_factor": 0.25,
|
| 84 |
+
"rms_norm_eps": 1e-06,
|
| 85 |
+
"rope_parameters": {
|
| 86 |
+
"mrope_interleaved": true,
|
| 87 |
+
"mrope_section": [
|
| 88 |
+
11,
|
| 89 |
+
11,
|
| 90 |
+
10
|
| 91 |
+
],
|
| 92 |
+
"partial_rotary_factor": 0.25,
|
| 93 |
+
"rope_theta": 10000000,
|
| 94 |
+
"rope_type": "default"
|
| 95 |
+
},
|
| 96 |
+
"router_aux_loss_coef": 0.001,
|
| 97 |
+
"shared_expert_intermediate_size": 512,
|
| 98 |
+
"tie_word_embeddings": false,
|
| 99 |
+
"use_cache": true,
|
| 100 |
+
"vocab_size": 248320
|
| 101 |
+
},
|
| 102 |
+
"tie_word_embeddings": false,
|
| 103 |
+
"unsloth_fixed": true,
|
| 104 |
+
"unsloth_version": "2026.4.1",
|
| 105 |
+
"video_token_id": 248057,
|
| 106 |
+
"vision_config": {
|
| 107 |
+
"deepstack_visual_indexes": [],
|
| 108 |
+
"depth": 27,
|
| 109 |
+
"torch_dtype": "bfloat16",
|
| 110 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 111 |
+
"hidden_size": 1152,
|
| 112 |
+
"in_channels": 3,
|
| 113 |
+
"initializer_range": 0.02,
|
| 114 |
+
"intermediate_size": 4304,
|
| 115 |
+
"model_type": "qwen3_5_moe",
|
| 116 |
+
"num_heads": 16,
|
| 117 |
+
"num_position_embeddings": 2304,
|
| 118 |
+
"out_hidden_size": 2048,
|
| 119 |
+
"patch_size": 16,
|
| 120 |
+
"spatial_merge_size": 2,
|
| 121 |
+
"temporal_patch_size": 2
|
| 122 |
+
},
|
| 123 |
+
"vision_end_token_id": 248054,
|
| 124 |
+
"vision_start_token_id": 248053
|
| 125 |
+
}
|
model.safetensors-00001-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e97189ebfe6db1fc249bc58a0553fc1e0a6e86072e34468be40761098ba6cb21
|
| 3 |
+
size 5368709808
|
model.safetensors-00002-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d74773e9e0eb367493a7a0665dc6b37e03631f3f80b8c9193c6f2c87105d0a1b
|
| 3 |
+
size 5368709808
|
model.safetensors-00003-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ae8c7ba3bd3fd4655d2875ad95bba37ff445786376578d765e3356c6b76ef3f
|
| 3 |
+
size 5368709808
|
model.safetensors-00004-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47aaa7c5863f0b99115554fde1e99f4e92feb0b61df125a3d7acb97e83a720b3
|
| 3 |
+
size 5368709816
|
model.safetensors-00005-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:647b62aec186ae7cf6d94f797e35b3ec13a2b086f505cffe417c862618d333d2
|
| 3 |
+
size 5368709816
|
model.safetensors-00006-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:494906d621841c0b08e604dcdaea9a1f956c3ec8e86b3c4fe46bf648c286420c
|
| 3 |
+
size 5368709816
|
model.safetensors-00007-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30561ad4af86669e3d000b49e19ee10b0a95deede6bc4d22baf466a693d2e7ae
|
| 3 |
+
size 5368709816
|
model.safetensors-00008-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7acb57472f6334041e4be90c81cc3311ec60a2240ce95bb052e10e080cf1e82
|
| 3 |
+
size 5368709816
|
model.safetensors-00009-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc12a264f4f572950b3059004a5bfbbf90c60d628f4520a64fd6ad4e04027c67
|
| 3 |
+
size 5255463928
|
model.safetensors-00010-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be10fb37c1ca52b28ddeec1221edad902e2acea6bd380924f744e1003df5a5a4
|
| 3 |
+
size 5368710456
|
model.safetensors-00011-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49a983d69eb21b3461f01ddc07e9c5e5f9fb1b61cc1156fb3a14f7339516f089
|
| 3 |
+
size 5368710464
|
model.safetensors-00012-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16aa9859e24677eeb4d541277e507e82fc397bf04d168c392698f2ee65d32457
|
| 3 |
+
size 5368710464
|
model.safetensors-00013-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6893ca1ef9d1be53ca18ef8179f337456bd9374bc83d802d8fb44505c8f8ac0e
|
| 3 |
+
size 5367839480
|
model.safetensors-00014-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa0a21f9babb1f0f49b59d7411d197571452959e6098f540266b64f3f6360495
|
| 3 |
+
size 2224764664
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processor_config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"data_format": "channels_first",
|
| 4 |
+
"do_convert_rgb": true,
|
| 5 |
+
"do_normalize": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_processor_type": "Qwen2VLImageProcessor",
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"merge_size": 2,
|
| 20 |
+
"patch_size": 16,
|
| 21 |
+
"resample": 3,
|
| 22 |
+
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"size": {
|
| 24 |
+
"longest_edge": 16777216,
|
| 25 |
+
"shortest_edge": 65536
|
| 26 |
+
},
|
| 27 |
+
"temporal_patch_size": 2
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "Qwen3VLProcessor",
|
| 30 |
+
"video_processor": {
|
| 31 |
+
"data_format": "channels_first",
|
| 32 |
+
"default_to_square": true,
|
| 33 |
+
"do_convert_rgb": true,
|
| 34 |
+
"do_normalize": true,
|
| 35 |
+
"do_rescale": true,
|
| 36 |
+
"do_resize": true,
|
| 37 |
+
"do_sample_frames": true,
|
| 38 |
+
"fps": 2,
|
| 39 |
+
"image_mean": [
|
| 40 |
+
0.5,
|
| 41 |
+
0.5,
|
| 42 |
+
0.5
|
| 43 |
+
],
|
| 44 |
+
"image_std": [
|
| 45 |
+
0.5,
|
| 46 |
+
0.5,
|
| 47 |
+
0.5
|
| 48 |
+
],
|
| 49 |
+
"max_frames": 768,
|
| 50 |
+
"merge_size": 2,
|
| 51 |
+
"min_frames": 4,
|
| 52 |
+
"patch_size": 16,
|
| 53 |
+
"resample": 3,
|
| 54 |
+
"rescale_factor": 0.00392156862745098,
|
| 55 |
+
"return_metadata": false,
|
| 56 |
+
"size": {
|
| 57 |
+
"longest_edge": 234881024,
|
| 58 |
+
"shortest_edge": 65536
|
| 59 |
+
},
|
| 60 |
+
"temporal_patch_size": 2,
|
| 61 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 62 |
+
}
|
| 63 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4
|
| 3 |
+
size 19989343
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": "<|endoftext|>",
|
| 10 |
+
"errors": "replace",
|
| 11 |
+
"image_token": "<|image_pad|>",
|
| 12 |
+
"is_local": false,
|
| 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": "<|vision_pad|>",
|
| 24 |
+
"padding_side": "left",
|
| 25 |
+
"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+",
|
| 26 |
+
"processor_class": "Qwen3VLProcessor",
|
| 27 |
+
"split_special_tokens": false,
|
| 28 |
+
"tokenizer_class": "TokenizersBackend",
|
| 29 |
+
"unk_token": null,
|
| 30 |
+
"video_token": "<|video_pad|>",
|
| 31 |
+
"vision_bos_token": "<|vision_start|>",
|
| 32 |
+
"vision_eos_token": "<|vision_end|>",
|
| 33 |
+
"chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\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>' }}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- if content %}\n {{- '\\n\\n' + content }}\n {%- endif %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n {{- raise_exception('No user query found in messages.') }}\n{%- endif %}\n{%- for message in messages %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" %}\n {%- if not loop.first %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- endif %}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- 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 %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}"
|
| 34 |
+
}
|