Initial upload of fine‑tuned Gemma + custom tokenizer
Browse files- .gitattributes +1 -0
- added_tokens.json +24 -0
- config.json +30 -0
- generation_config.json +6 -0
- model-00001-of-00006.safetensors +3 -0
- model-00002-of-00006.safetensors +3 -0
- model-00003-of-00006.safetensors +3 -0
- model-00004-of-00006.safetensors +3 -0
- model-00005-of-00006.safetensors +3 -0
- model-00006-of-00006.safetensors +3 -0
- model.safetensors.index.json +450 -0
- qwen_explicit_tokenizer.py +448 -0
- special_tokens_map.json +31 -0
- tokenizer.json +3 -0
- tokenizer_config.json +216 -0
- training_args.bin +3 -0
- vocab.json +0 -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
|
added_tokens.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</tool_call>": 151658,
|
| 3 |
+
"<tool_call>": 151657,
|
| 4 |
+
"<|box_end|>": 151649,
|
| 5 |
+
"<|box_start|>": 151648,
|
| 6 |
+
"<|endoftext|>": 151643,
|
| 7 |
+
"<|file_sep|>": 151664,
|
| 8 |
+
"<|fim_middle|>": 151660,
|
| 9 |
+
"<|fim_pad|>": 151662,
|
| 10 |
+
"<|fim_prefix|>": 151659,
|
| 11 |
+
"<|fim_suffix|>": 151661,
|
| 12 |
+
"<|im_end|>": 151645,
|
| 13 |
+
"<|im_start|>": 151644,
|
| 14 |
+
"<|image_pad|>": 151655,
|
| 15 |
+
"<|object_ref_end|>": 151647,
|
| 16 |
+
"<|object_ref_start|>": 151646,
|
| 17 |
+
"<|quad_end|>": 151651,
|
| 18 |
+
"<|quad_start|>": 151650,
|
| 19 |
+
"<|repo_name|>": 151663,
|
| 20 |
+
"<|video_pad|>": 151656,
|
| 21 |
+
"<|vision_end|>": 151653,
|
| 22 |
+
"<|vision_pad|>": 151654,
|
| 23 |
+
"<|vision_start|>": 151652
|
| 24 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 151643,
|
| 8 |
+
"eos_token_id": 151643,
|
| 9 |
+
"head_dim": 128,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 5120,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 17408,
|
| 14 |
+
"max_position_embeddings": 32768,
|
| 15 |
+
"max_window_layers": 40,
|
| 16 |
+
"model_type": "qwen3",
|
| 17 |
+
"num_attention_heads": 40,
|
| 18 |
+
"num_hidden_layers": 40,
|
| 19 |
+
"num_key_value_heads": 8,
|
| 20 |
+
"rms_norm_eps": 1e-06,
|
| 21 |
+
"rope_scaling": null,
|
| 22 |
+
"rope_theta": 1000000,
|
| 23 |
+
"sliding_window": null,
|
| 24 |
+
"tie_word_embeddings": false,
|
| 25 |
+
"torch_dtype": "bfloat16",
|
| 26 |
+
"transformers_version": "4.51.3",
|
| 27 |
+
"use_cache": true,
|
| 28 |
+
"use_sliding_window": false,
|
| 29 |
+
"vocab_size": 151936
|
| 30 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"eos_token_id": 151643,
|
| 4 |
+
"max_new_tokens": 2048,
|
| 5 |
+
"transformers_version": "4.51.3"
|
| 6 |
+
}
|
model-00001-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7afd9dae83959aeea4722afd357a444d112ea72bb5b4437a791d513cecda50b
|
| 3 |
+
size 4984780784
|
model-00002-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:385133348ddfa497b67637b84d69a5b5e4591828826aba1a53550758302008c3
|
| 3 |
+
size 4980892048
|
model-00003-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3365d4f66aec939c560d9bdb8202fc222445aacb3a39780b3996a0cf797ebd93
|
| 3 |
+
size 4928485104
|
model-00004-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d61e9fc2e7bbf3b68164d569b40229d001c897381806bf4509596d0d5627a88d
|
| 3 |
+
size 4980892112
|
model-00005-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:617e77c33924339543d84f00f34d162de9c4cfbb67b8432fbaebca91dd74d397
|
| 3 |
+
size 4928485104
|
model-00006-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36d22d19a0141b292b2f9ac618b0979350a71d6a2bba0311a99fa0e255c7f261
|
| 3 |
+
size 4733130504
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 29536614400
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"lm_head.weight": "model-00006-of-00006.safetensors",
|
| 7 |
+
"model.embed_tokens.weight": "model-00001-of-00006.safetensors",
|
| 8 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 9 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
| 10 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
| 11 |
+
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
| 12 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 13 |
+
"model.layers.0.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 14 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 15 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 16 |
+
"model.layers.0.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 17 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 18 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 19 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 20 |
+
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
| 21 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
| 22 |
+
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
| 23 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 24 |
+
"model.layers.1.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 25 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 26 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 27 |
+
"model.layers.1.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 28 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 29 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 30 |
+
"model.layers.10.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 31 |
+
"model.layers.10.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 32 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 33 |
+
"model.layers.10.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 34 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 35 |
+
"model.layers.10.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 36 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 37 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 38 |
+
"model.layers.10.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 39 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 40 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 41 |
+
"model.layers.11.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 42 |
+
"model.layers.11.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 43 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 44 |
+
"model.layers.11.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 45 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 46 |
+
"model.layers.11.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 47 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 48 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 49 |
+
"model.layers.11.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 50 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 51 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 52 |
+
"model.layers.12.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 53 |
+
"model.layers.12.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 54 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 55 |
+
"model.layers.12.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 56 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 57 |
+
"model.layers.12.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 58 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 59 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 60 |
+
"model.layers.12.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 61 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 62 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 63 |
+
"model.layers.13.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 64 |
+
"model.layers.13.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 65 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 66 |
+
"model.layers.13.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 67 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 68 |
+
"model.layers.13.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 69 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 70 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 71 |
+
"model.layers.13.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 72 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 73 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 74 |
+
"model.layers.14.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 75 |
+
"model.layers.14.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 76 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 77 |
+
"model.layers.14.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 78 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 79 |
+
"model.layers.14.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 80 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 81 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 82 |
+
"model.layers.14.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 83 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 84 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 85 |
+
"model.layers.15.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 86 |
+
"model.layers.15.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 87 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 88 |
+
"model.layers.15.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 89 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 90 |
+
"model.layers.15.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 91 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 92 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 93 |
+
"model.layers.15.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 94 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 95 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 96 |
+
"model.layers.16.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 97 |
+
"model.layers.16.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 98 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 99 |
+
"model.layers.16.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 100 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 101 |
+
"model.layers.16.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 102 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 103 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 104 |
+
"model.layers.16.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 105 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 106 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 107 |
+
"model.layers.17.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 108 |
+
"model.layers.17.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 109 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 110 |
+
"model.layers.17.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 111 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 112 |
+
"model.layers.17.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 113 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 114 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 115 |
+
"model.layers.17.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 116 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 117 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 118 |
+
"model.layers.18.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 119 |
+
"model.layers.18.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 120 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 121 |
+
"model.layers.18.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 122 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 123 |
+
"model.layers.18.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 124 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 125 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 126 |
+
"model.layers.18.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 127 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 128 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 129 |
+
"model.layers.19.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 130 |
+
"model.layers.19.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
| 131 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
| 132 |
+
"model.layers.19.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
| 133 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
| 134 |
+
"model.layers.19.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 135 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 136 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 137 |
+
"model.layers.19.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 138 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 139 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 140 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 141 |
+
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
| 142 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
| 143 |
+
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
| 144 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 145 |
+
"model.layers.2.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 146 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 147 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 148 |
+
"model.layers.2.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 149 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 150 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 151 |
+
"model.layers.20.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 152 |
+
"model.layers.20.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 153 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 154 |
+
"model.layers.20.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 155 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 156 |
+
"model.layers.20.self_attn.k_norm.weight": "model-00003-of-00006.safetensors",
|
| 157 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
| 158 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
| 159 |
+
"model.layers.20.self_attn.q_norm.weight": "model-00003-of-00006.safetensors",
|
| 160 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
| 161 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
| 162 |
+
"model.layers.21.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 163 |
+
"model.layers.21.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 164 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 165 |
+
"model.layers.21.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 166 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 167 |
+
"model.layers.21.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 168 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 169 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 170 |
+
"model.layers.21.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 171 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 172 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 173 |
+
"model.layers.22.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 174 |
+
"model.layers.22.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 175 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 176 |
+
"model.layers.22.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 177 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 178 |
+
"model.layers.22.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 179 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 180 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 181 |
+
"model.layers.22.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 182 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 183 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 184 |
+
"model.layers.23.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 185 |
+
"model.layers.23.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 186 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 187 |
+
"model.layers.23.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 188 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 189 |
+
"model.layers.23.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 190 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 191 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 192 |
+
"model.layers.23.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 193 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 194 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 195 |
+
"model.layers.24.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 196 |
+
"model.layers.24.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 197 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 198 |
+
"model.layers.24.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 199 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 200 |
+
"model.layers.24.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 201 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 202 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 203 |
+
"model.layers.24.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 204 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 205 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 206 |
+
"model.layers.25.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 207 |
+
"model.layers.25.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 208 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 209 |
+
"model.layers.25.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 210 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 211 |
+
"model.layers.25.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 212 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 213 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 214 |
+
"model.layers.25.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 215 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 216 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 217 |
+
"model.layers.26.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 218 |
+
"model.layers.26.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
| 219 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 220 |
+
"model.layers.26.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 221 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
| 222 |
+
"model.layers.26.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 223 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 224 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 225 |
+
"model.layers.26.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 226 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 227 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 228 |
+
"model.layers.27.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 229 |
+
"model.layers.27.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 230 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
| 231 |
+
"model.layers.27.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
| 232 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 233 |
+
"model.layers.27.self_attn.k_norm.weight": "model-00004-of-00006.safetensors",
|
| 234 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
| 235 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
| 236 |
+
"model.layers.27.self_attn.q_norm.weight": "model-00004-of-00006.safetensors",
|
| 237 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
| 238 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
| 239 |
+
"model.layers.28.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 240 |
+
"model.layers.28.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 241 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 242 |
+
"model.layers.28.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 243 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 244 |
+
"model.layers.28.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 245 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 246 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 247 |
+
"model.layers.28.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 248 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 249 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 250 |
+
"model.layers.29.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 251 |
+
"model.layers.29.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 252 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 253 |
+
"model.layers.29.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 254 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 255 |
+
"model.layers.29.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 256 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 257 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 258 |
+
"model.layers.29.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 259 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 260 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 261 |
+
"model.layers.3.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 262 |
+
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
| 263 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
| 264 |
+
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
| 265 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 266 |
+
"model.layers.3.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 267 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 268 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 269 |
+
"model.layers.3.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 270 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 271 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 272 |
+
"model.layers.30.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 273 |
+
"model.layers.30.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 274 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 275 |
+
"model.layers.30.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 276 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 277 |
+
"model.layers.30.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 278 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 279 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 280 |
+
"model.layers.30.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 281 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 282 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 283 |
+
"model.layers.31.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 284 |
+
"model.layers.31.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 285 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 286 |
+
"model.layers.31.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 287 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 288 |
+
"model.layers.31.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 289 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 290 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 291 |
+
"model.layers.31.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 292 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 293 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 294 |
+
"model.layers.32.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 295 |
+
"model.layers.32.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 296 |
+
"model.layers.32.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 297 |
+
"model.layers.32.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 298 |
+
"model.layers.32.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 299 |
+
"model.layers.32.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 300 |
+
"model.layers.32.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 301 |
+
"model.layers.32.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 302 |
+
"model.layers.32.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 303 |
+
"model.layers.32.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 304 |
+
"model.layers.32.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 305 |
+
"model.layers.33.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 306 |
+
"model.layers.33.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 307 |
+
"model.layers.33.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 308 |
+
"model.layers.33.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 309 |
+
"model.layers.33.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 310 |
+
"model.layers.33.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 311 |
+
"model.layers.33.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 312 |
+
"model.layers.33.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 313 |
+
"model.layers.33.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 314 |
+
"model.layers.33.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 315 |
+
"model.layers.33.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 316 |
+
"model.layers.34.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 317 |
+
"model.layers.34.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
| 318 |
+
"model.layers.34.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
| 319 |
+
"model.layers.34.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
| 320 |
+
"model.layers.34.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
| 321 |
+
"model.layers.34.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 322 |
+
"model.layers.34.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 323 |
+
"model.layers.34.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 324 |
+
"model.layers.34.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 325 |
+
"model.layers.34.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 326 |
+
"model.layers.34.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 327 |
+
"model.layers.35.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 328 |
+
"model.layers.35.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
| 329 |
+
"model.layers.35.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
| 330 |
+
"model.layers.35.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
| 331 |
+
"model.layers.35.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 332 |
+
"model.layers.35.self_attn.k_norm.weight": "model-00005-of-00006.safetensors",
|
| 333 |
+
"model.layers.35.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
| 334 |
+
"model.layers.35.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
| 335 |
+
"model.layers.35.self_attn.q_norm.weight": "model-00005-of-00006.safetensors",
|
| 336 |
+
"model.layers.35.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
| 337 |
+
"model.layers.35.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
| 338 |
+
"model.layers.36.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 339 |
+
"model.layers.36.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
| 340 |
+
"model.layers.36.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
| 341 |
+
"model.layers.36.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
| 342 |
+
"model.layers.36.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 343 |
+
"model.layers.36.self_attn.k_norm.weight": "model-00006-of-00006.safetensors",
|
| 344 |
+
"model.layers.36.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
| 345 |
+
"model.layers.36.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
| 346 |
+
"model.layers.36.self_attn.q_norm.weight": "model-00006-of-00006.safetensors",
|
| 347 |
+
"model.layers.36.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
| 348 |
+
"model.layers.36.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
| 349 |
+
"model.layers.37.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 350 |
+
"model.layers.37.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
| 351 |
+
"model.layers.37.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
| 352 |
+
"model.layers.37.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
| 353 |
+
"model.layers.37.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 354 |
+
"model.layers.37.self_attn.k_norm.weight": "model-00006-of-00006.safetensors",
|
| 355 |
+
"model.layers.37.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
| 356 |
+
"model.layers.37.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
| 357 |
+
"model.layers.37.self_attn.q_norm.weight": "model-00006-of-00006.safetensors",
|
| 358 |
+
"model.layers.37.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
| 359 |
+
"model.layers.37.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
| 360 |
+
"model.layers.38.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 361 |
+
"model.layers.38.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
| 362 |
+
"model.layers.38.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
| 363 |
+
"model.layers.38.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
| 364 |
+
"model.layers.38.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 365 |
+
"model.layers.38.self_attn.k_norm.weight": "model-00006-of-00006.safetensors",
|
| 366 |
+
"model.layers.38.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
| 367 |
+
"model.layers.38.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
| 368 |
+
"model.layers.38.self_attn.q_norm.weight": "model-00006-of-00006.safetensors",
|
| 369 |
+
"model.layers.38.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
| 370 |
+
"model.layers.38.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
| 371 |
+
"model.layers.39.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 372 |
+
"model.layers.39.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
| 373 |
+
"model.layers.39.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
| 374 |
+
"model.layers.39.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
| 375 |
+
"model.layers.39.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
| 376 |
+
"model.layers.39.self_attn.k_norm.weight": "model-00006-of-00006.safetensors",
|
| 377 |
+
"model.layers.39.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
| 378 |
+
"model.layers.39.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
| 379 |
+
"model.layers.39.self_attn.q_norm.weight": "model-00006-of-00006.safetensors",
|
| 380 |
+
"model.layers.39.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
| 381 |
+
"model.layers.39.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
| 382 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 383 |
+
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
| 384 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
| 385 |
+
"model.layers.4.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
| 386 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
| 387 |
+
"model.layers.4.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 388 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 389 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 390 |
+
"model.layers.4.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 391 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 392 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 393 |
+
"model.layers.5.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 394 |
+
"model.layers.5.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 395 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 396 |
+
"model.layers.5.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 397 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 398 |
+
"model.layers.5.self_attn.k_norm.weight": "model-00001-of-00006.safetensors",
|
| 399 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
| 400 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
| 401 |
+
"model.layers.5.self_attn.q_norm.weight": "model-00001-of-00006.safetensors",
|
| 402 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
| 403 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
| 404 |
+
"model.layers.6.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 405 |
+
"model.layers.6.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 406 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 407 |
+
"model.layers.6.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 408 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 409 |
+
"model.layers.6.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 410 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 411 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 412 |
+
"model.layers.6.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 413 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 414 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 415 |
+
"model.layers.7.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 416 |
+
"model.layers.7.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 417 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 418 |
+
"model.layers.7.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 419 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 420 |
+
"model.layers.7.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 421 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 422 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 423 |
+
"model.layers.7.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 424 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 425 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 426 |
+
"model.layers.8.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 427 |
+
"model.layers.8.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 428 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 429 |
+
"model.layers.8.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 430 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 431 |
+
"model.layers.8.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 432 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 433 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 434 |
+
"model.layers.8.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 435 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 436 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 437 |
+
"model.layers.9.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 438 |
+
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
| 439 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
| 440 |
+
"model.layers.9.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
| 441 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
| 442 |
+
"model.layers.9.self_attn.k_norm.weight": "model-00002-of-00006.safetensors",
|
| 443 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
| 444 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
| 445 |
+
"model.layers.9.self_attn.q_norm.weight": "model-00002-of-00006.safetensors",
|
| 446 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
| 447 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
| 448 |
+
"model.norm.weight": "model-00006-of-00006.safetensors"
|
| 449 |
+
}
|
| 450 |
+
}
|
qwen_explicit_tokenizer.py
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Custom Qwen Tokenizer for explicit Format
|
| 3 |
+
|
| 4 |
+
This tokenizer implements the explicit format for message processing:
|
| 5 |
+
Format: Uses the standard chat template with proper role labels (user/assistant)
|
| 6 |
+
|
| 7 |
+
The explicit format uses the model's built-in chat template and includes proper
|
| 8 |
+
loss computation flags for training.
|
| 9 |
+
|
| 10 |
+
To save:
|
| 11 |
+
uv run tokenizers/qwen_explicit_tokenizer.py
|
| 12 |
+
which will save the tokenizer to the repos/explicit-qwen-tokenizer directory.
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
from typing import List, Dict, Any, Optional, Union
|
| 16 |
+
from transformers import AutoTokenizer
|
| 17 |
+
from transformers import Qwen2Tokenizer
|
| 18 |
+
from transformers import Qwen2TokenizerFast
|
| 19 |
+
import warnings
|
| 20 |
+
import difflib
|
| 21 |
+
import json
|
| 22 |
+
import os
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class QwenExplicitTokenizer(Qwen2TokenizerFast):
|
| 26 |
+
"""
|
| 27 |
+
Custom tokenizer for Qwen models that implements explicit format message processing.
|
| 28 |
+
|
| 29 |
+
This tokenizer formats messages using the explicit format where:
|
| 30 |
+
- Messages use the standard chat template with proper role labels
|
| 31 |
+
- Uses the model's built-in chat formatting
|
| 32 |
+
- Loss is computed on the assistant/output sections
|
| 33 |
+
|
| 34 |
+
Attributes:
|
| 35 |
+
start_string (str): The starting string used for output generation (depends on tokenizer)
|
| 36 |
+
end_string (str): The ending string used for output generation (depends on tokenizer)
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
def __init__(self, *args, **kwargs):
|
| 40 |
+
"""
|
| 41 |
+
Initialize the custom tokenizer.
|
| 42 |
+
|
| 43 |
+
Accepts the same arguments as Qwen2TokenizerFast.
|
| 44 |
+
"""
|
| 45 |
+
super().__init__(*args, **kwargs)
|
| 46 |
+
|
| 47 |
+
# For explicit format, we use Qwen-specific tokens
|
| 48 |
+
self.start_string = "<|im_start|>"
|
| 49 |
+
self.end_string = "<|im_end|>"
|
| 50 |
+
|
| 51 |
+
if not hasattr(self, 'init_kwargs'):
|
| 52 |
+
self.init_kwargs = {}
|
| 53 |
+
self.init_kwargs['start_string'] = self.start_string
|
| 54 |
+
self.init_kwargs['end_string'] = self.end_string
|
| 55 |
+
|
| 56 |
+
@classmethod
|
| 57 |
+
def from_qwen_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs):
|
| 58 |
+
"""
|
| 59 |
+
Load a tokenizer from a pretrained model or path.
|
| 60 |
+
|
| 61 |
+
This method ensures our custom class is used instead of the base Qwen2TokenizerFast.
|
| 62 |
+
"""
|
| 63 |
+
# Load the base tokenizer first to get all configuration
|
| 64 |
+
base_tokenizer = Qwen2TokenizerFast.from_pretrained(
|
| 65 |
+
pretrained_model_name_or_path, *args, **kwargs
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
# Create new instance of our custom class by copying the base tokenizer
|
| 69 |
+
custom_tokenizer = cls.__new__(cls)
|
| 70 |
+
|
| 71 |
+
# Copy all attributes from base tokenizer
|
| 72 |
+
for attr, value in base_tokenizer.__dict__.items():
|
| 73 |
+
setattr(custom_tokenizer, attr, value)
|
| 74 |
+
|
| 75 |
+
# Initialize our custom attributes for explicit format
|
| 76 |
+
custom_tokenizer.start_string = "<|im_start|>"
|
| 77 |
+
custom_tokenizer.end_string = "<|im_end|>"
|
| 78 |
+
|
| 79 |
+
# Update init_kwargs to include our custom attributes
|
| 80 |
+
if not hasattr(custom_tokenizer, 'init_kwargs'):
|
| 81 |
+
custom_tokenizer.init_kwargs = {}
|
| 82 |
+
custom_tokenizer.init_kwargs['start_string'] = custom_tokenizer.start_string
|
| 83 |
+
custom_tokenizer.init_kwargs['end_string'] = custom_tokenizer.end_string
|
| 84 |
+
|
| 85 |
+
return custom_tokenizer
|
| 86 |
+
|
| 87 |
+
def save_pretrained(self, save_directory: Union[str, os.PathLike], **kwargs):
|
| 88 |
+
"""
|
| 89 |
+
Save the tokenizer to a directory, including custom configuration.
|
| 90 |
+
"""
|
| 91 |
+
# Call parent save method
|
| 92 |
+
super().save_pretrained(save_directory, **kwargs)
|
| 93 |
+
|
| 94 |
+
# Save custom configuration
|
| 95 |
+
config_file = os.path.join(save_directory, "tokenizer_config.json")
|
| 96 |
+
if os.path.exists(config_file):
|
| 97 |
+
with open(config_file, 'r') as f:
|
| 98 |
+
config = json.load(f)
|
| 99 |
+
else:
|
| 100 |
+
config = {}
|
| 101 |
+
|
| 102 |
+
# Add our custom class info
|
| 103 |
+
config["tokenizer_class"] = "QwenExplicitTokenizer"
|
| 104 |
+
config["start_string"] = self.start_string
|
| 105 |
+
config["end_string"] = self.end_string
|
| 106 |
+
# Point to our custom class in the uploaded file
|
| 107 |
+
config["auto_map"] = {
|
| 108 |
+
"AutoTokenizer": ["qwen_explicit_tokenizer.QwenExplicitTokenizer", "qwen_explicit_tokenizer.QwenExplicitTokenizer"]
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
with open(config_file, 'w') as f:
|
| 112 |
+
json.dump(config, f, indent=2)
|
| 113 |
+
|
| 114 |
+
def messages_to_loss_texts(
|
| 115 |
+
self,
|
| 116 |
+
messages: List[Dict[str, Any]],
|
| 117 |
+
start_generation: bool = False,
|
| 118 |
+
) -> List[Dict[str, Any]]:
|
| 119 |
+
"""
|
| 120 |
+
From messages (description / input / output) to texts (text / compute_loss) with whether or not loss should be calculated on the text for training.
|
| 121 |
+
Uses the explicit format matching chat_utils.py.
|
| 122 |
+
"""
|
| 123 |
+
|
| 124 |
+
# Qwen3 explicit parameters copied from chat_utils.py
|
| 125 |
+
description_map = lambda x: [{
|
| 126 |
+
"text": "<|im_start|>description\n" + x + "<|im_end|>\n",
|
| 127 |
+
"compute_loss": False,
|
| 128 |
+
}]
|
| 129 |
+
input_map = lambda x: [{
|
| 130 |
+
"text": "<|im_start|>input\n" + x + "<|im_end|>\n",
|
| 131 |
+
"compute_loss": False,
|
| 132 |
+
}]
|
| 133 |
+
output_map = lambda x: [{
|
| 134 |
+
"text": "<|im_start|>output\n",
|
| 135 |
+
"compute_loss": False,
|
| 136 |
+
},{
|
| 137 |
+
"text": x + "<|im_end|>",
|
| 138 |
+
"compute_loss": True,
|
| 139 |
+
},{
|
| 140 |
+
"text": "\n",
|
| 141 |
+
"compute_loss": False,
|
| 142 |
+
}]
|
| 143 |
+
|
| 144 |
+
texts = []
|
| 145 |
+
has_description = False
|
| 146 |
+
first_output = True
|
| 147 |
+
|
| 148 |
+
for message in messages:
|
| 149 |
+
role = message["role"]
|
| 150 |
+
content = message["content"]
|
| 151 |
+
|
| 152 |
+
if role == "description":
|
| 153 |
+
has_description = True
|
| 154 |
+
texts.extend(description_map(content))
|
| 155 |
+
elif role == "input":
|
| 156 |
+
texts.extend(input_map(content))
|
| 157 |
+
elif role == "output":
|
| 158 |
+
out_texts = output_map(content)
|
| 159 |
+
if first_output and not has_description:
|
| 160 |
+
# set compute_loss to False for all
|
| 161 |
+
for text in out_texts:
|
| 162 |
+
text["compute_loss"] = False
|
| 163 |
+
texts.extend(out_texts)
|
| 164 |
+
first_output = False
|
| 165 |
+
else:
|
| 166 |
+
raise ValueError(f"Unknown role: {role}. Must be description, input, or output.")
|
| 167 |
+
|
| 168 |
+
# Add generation prompt if start_generation is True
|
| 169 |
+
if start_generation:
|
| 170 |
+
start_generation_text = "<|im_start|>output\n"
|
| 171 |
+
texts.extend([{"text": start_generation_text, "compute_loss": False}])
|
| 172 |
+
|
| 173 |
+
return texts
|
| 174 |
+
|
| 175 |
+
def messages_to_text(
|
| 176 |
+
self,
|
| 177 |
+
messages: List[Dict[str, Any]],
|
| 178 |
+
start_generation: bool = False,
|
| 179 |
+
) -> str:
|
| 180 |
+
"""
|
| 181 |
+
Messages (description / input / output) to raw text (text).
|
| 182 |
+
Uses the explicit format matching chat_utils.py.
|
| 183 |
+
"""
|
| 184 |
+
texts = self.messages_to_loss_texts(messages, start_generation=start_generation)
|
| 185 |
+
text = "".join([text["text"] for text in texts])
|
| 186 |
+
return text
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def tokenize_messages(
|
| 190 |
+
self,
|
| 191 |
+
messages: List[Dict[str, Any]] | List[List[Dict[str, Any]]],
|
| 192 |
+
start_generation: bool = False,
|
| 193 |
+
**kwargs,
|
| 194 |
+
):
|
| 195 |
+
"""
|
| 196 |
+
For tokenizing from messages to texts. Supports batching. Good for generation
|
| 197 |
+
"""
|
| 198 |
+
if isinstance(messages, list) and isinstance(messages[0], list):
|
| 199 |
+
# Handle list of lists of messages
|
| 200 |
+
all_texts = []
|
| 201 |
+
for message_list in messages:
|
| 202 |
+
texts = self.messages_to_text(message_list, start_generation)
|
| 203 |
+
all_texts.append(texts)
|
| 204 |
+
else:
|
| 205 |
+
# Handle single list of messages
|
| 206 |
+
texts = self.messages_to_text(messages, start_generation)
|
| 207 |
+
all_texts = [texts]
|
| 208 |
+
|
| 209 |
+
# Tokenize all texts
|
| 210 |
+
processed = self(text=all_texts, **kwargs)
|
| 211 |
+
# if start_generation, remove the last token if it is the eos token
|
| 212 |
+
if start_generation and processed["input_ids"][-1] == self.eos_token_id:
|
| 213 |
+
processed["input_ids"] = processed["input_ids"][:-1]
|
| 214 |
+
processed["attention_mask"] = processed["attention_mask"][:-1]
|
| 215 |
+
processed["labels"] = processed["labels"][:-1]
|
| 216 |
+
return processed
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
def tokenize_loss_texts(
|
| 220 |
+
self,
|
| 221 |
+
texts: List[Dict[str, Any]],
|
| 222 |
+
loss_on_eos: bool = False,
|
| 223 |
+
include_eos: bool = True,
|
| 224 |
+
):
|
| 225 |
+
"""
|
| 226 |
+
Tokenize texts (text / compute_loss) to tokenized texts (input_ids / attention_mask / labels).
|
| 227 |
+
|
| 228 |
+
Needs more complex logic to handle the back and forth labeling.
|
| 229 |
+
"""
|
| 230 |
+
if loss_on_eos:
|
| 231 |
+
raise ValueError("Loss on EOS is not currently supported.")
|
| 232 |
+
|
| 233 |
+
# Handle single string input
|
| 234 |
+
if isinstance(texts, str):
|
| 235 |
+
processed = self(text=texts)
|
| 236 |
+
# Add EOS token if needed
|
| 237 |
+
if (self.eos_token_id is not None and
|
| 238 |
+
processed["input_ids"][-1] != self.eos_token_id):
|
| 239 |
+
processed["input_ids"] = processed["input_ids"] + [self.eos_token_id]
|
| 240 |
+
processed["attention_mask"] = processed["attention_mask"] + [1]
|
| 241 |
+
return processed
|
| 242 |
+
|
| 243 |
+
# Handle list of text dictionaries
|
| 244 |
+
all_processed = []
|
| 245 |
+
all_texts = ''
|
| 246 |
+
example_inds = []
|
| 247 |
+
dataset_inds = []
|
| 248 |
+
|
| 249 |
+
for i, item in enumerate(texts):
|
| 250 |
+
processed = self(text=item["text"])
|
| 251 |
+
|
| 252 |
+
# Remove BOS token from all but first item
|
| 253 |
+
if i != 0 and self.bos_token_id == processed["input_ids"][0]:
|
| 254 |
+
processed["input_ids"] = processed["input_ids"][1:]
|
| 255 |
+
processed["attention_mask"] = processed["attention_mask"][1:]
|
| 256 |
+
|
| 257 |
+
# # Remove EOS token if present at the end
|
| 258 |
+
# if processed["input_ids"][-1] == self.eos_token_id:
|
| 259 |
+
# processed["input_ids"] = processed["input_ids"][:-1]
|
| 260 |
+
# processed["attention_mask"] = processed["attention_mask"][:-1]
|
| 261 |
+
|
| 262 |
+
# # Check for EOS token in the middle (with special handling for <|im_end|>)
|
| 263 |
+
# if self.eos_token_id in processed["input_ids"]:
|
| 264 |
+
# if not self.decode([self.eos_token_id]) == "<|im_end|>":
|
| 265 |
+
# raise ValueError(f"EOS token is present in input_ids: {processed['input_ids']}. Not currently supported.")
|
| 266 |
+
|
| 267 |
+
# Set labels based on compute_loss flag
|
| 268 |
+
if item["compute_loss"]:
|
| 269 |
+
processed["labels"] = processed["input_ids"].copy()
|
| 270 |
+
else:
|
| 271 |
+
processed["labels"] = [-100] * len(processed["input_ids"])
|
| 272 |
+
|
| 273 |
+
# Remove duplicate BOS tokens
|
| 274 |
+
if all_processed:
|
| 275 |
+
if processed["input_ids"][0] == self.bos_token_id:
|
| 276 |
+
processed["input_ids"] = processed["input_ids"][1:]
|
| 277 |
+
processed["attention_mask"] = processed["attention_mask"][1:]
|
| 278 |
+
processed["labels"] = processed["labels"][1:]
|
| 279 |
+
|
| 280 |
+
all_processed.append(processed)
|
| 281 |
+
all_texts += item["text"]
|
| 282 |
+
|
| 283 |
+
# Handle example indices
|
| 284 |
+
this_num = -1
|
| 285 |
+
if 'example_ind' in item.keys():
|
| 286 |
+
if item["example_ind"] is not None:
|
| 287 |
+
this_num = item["example_ind"]
|
| 288 |
+
example_inds.extend([this_num] * len(processed["input_ids"]))
|
| 289 |
+
|
| 290 |
+
# Handle dataset indices
|
| 291 |
+
dataset_ind = -1
|
| 292 |
+
if "data_id" in item.keys():
|
| 293 |
+
if item["data_id"] is not None:
|
| 294 |
+
dataset_ind = item["data_id"]
|
| 295 |
+
dataset_inds.extend([dataset_ind] * len(processed["input_ids"]))
|
| 296 |
+
|
| 297 |
+
# Combine all processed results
|
| 298 |
+
processed = all_processed[0].copy()
|
| 299 |
+
processed["input_ids"] = [item for sublist in [p["input_ids"] for p in all_processed] for item in sublist]
|
| 300 |
+
processed["attention_mask"] = [item for sublist in [p["attention_mask"] for p in all_processed] for item in sublist]
|
| 301 |
+
processed["labels"] = [item for sublist in [p["labels"] for p in all_processed] for item in sublist]
|
| 302 |
+
processed["example_inds"] = example_inds
|
| 303 |
+
processed["data_ids"] = dataset_inds
|
| 304 |
+
|
| 305 |
+
# Validate by tokenizing all_texts at once and comparing
|
| 306 |
+
processed_all = self(text=all_texts)
|
| 307 |
+
if len(processed_all["input_ids"]) != len(processed["input_ids"]):
|
| 308 |
+
warnings.warn(f"All texts are not the same length as the first text. Please check your dataset. {len(processed_all['input_ids'])} != {len(processed['input_ids'])}")
|
| 309 |
+
|
| 310 |
+
# Generate diff for debugging
|
| 311 |
+
all_text = self.decode(processed_all["input_ids"], skip_special_tokens=False)
|
| 312 |
+
processed_text = self.decode(processed["input_ids"], skip_special_tokens=False)
|
| 313 |
+
|
| 314 |
+
diff = difflib.unified_diff(all_text.splitlines(), processed_text.splitlines())
|
| 315 |
+
diff_str = "\n".join(diff)
|
| 316 |
+
print("Diff between texts:")
|
| 317 |
+
print(diff_str)
|
| 318 |
+
|
| 319 |
+
# Token diff
|
| 320 |
+
all_tokens_str = '\n'.join([str(s) for s in processed_all["input_ids"]])
|
| 321 |
+
processed_tokens_str = '\n'.join([str(s) for s in processed["input_ids"]])
|
| 322 |
+
token_diff = difflib.unified_diff(all_tokens_str.splitlines(), processed_tokens_str.splitlines())
|
| 323 |
+
token_diff_str = "\n".join(token_diff)
|
| 324 |
+
print("Diff between tokenized texts:")
|
| 325 |
+
print(token_diff_str)
|
| 326 |
+
breakpoint()
|
| 327 |
+
|
| 328 |
+
# Add EOS token if needed
|
| 329 |
+
if (self.eos_token_id is not None and
|
| 330 |
+
processed["input_ids"][-1] != self.eos_token_id):
|
| 331 |
+
processed["input_ids"] = processed["input_ids"] + [self.eos_token_id]
|
| 332 |
+
processed["example_inds"] = processed["example_inds"] + [-1]
|
| 333 |
+
processed["attention_mask"] = processed["attention_mask"] + [1]
|
| 334 |
+
if processed["labels"] is not None:
|
| 335 |
+
if loss_on_eos:
|
| 336 |
+
processed["labels"] = processed["labels"] + [self.eos_token_id]
|
| 337 |
+
else:
|
| 338 |
+
processed["labels"] = processed["labels"] + [-100]
|
| 339 |
+
if "data_ids" in processed:
|
| 340 |
+
processed["data_ids"] = processed["data_ids"] + [-1]
|
| 341 |
+
|
| 342 |
+
# if not include_eos:
|
| 343 |
+
# # check if EOS token is present
|
| 344 |
+
# if processed["input_ids"][-1] == self.eos_token_id:
|
| 345 |
+
# # remove EOS token
|
| 346 |
+
# processed["input_ids"] = processed["input_ids"][:-1]
|
| 347 |
+
# processed["attention_mask"] = processed["attention_mask"][:-1]
|
| 348 |
+
# processed["labels"] = processed["labels"][:-1]
|
| 349 |
+
# processed["example_inds"] = processed["example_inds"][:-1]
|
| 350 |
+
# processed["data_ids"] = processed["data_ids"][:-1]
|
| 351 |
+
|
| 352 |
+
return processed
|
| 353 |
+
|
| 354 |
+
def tokenize_messages_with_loss(
|
| 355 |
+
self,
|
| 356 |
+
messages: List[Dict[str, Any]],
|
| 357 |
+
loss_on_eos: bool = False,
|
| 358 |
+
include_eos: bool = True,
|
| 359 |
+
) -> Dict[str, Any]:
|
| 360 |
+
"""
|
| 361 |
+
Intended for tokenize from messages to tokenized texts with the loss applied.
|
| 362 |
+
"""
|
| 363 |
+
# First convert messages to text with loss computation flags
|
| 364 |
+
texts = self.messages_to_loss_texts(messages)
|
| 365 |
+
|
| 366 |
+
# Then tokenize the texts
|
| 367 |
+
return self.tokenize_loss_texts(texts, loss_on_eos, include_eos = include_eos)
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
# Register tokenizer classes for AutoTokenizer
|
| 371 |
+
AutoTokenizer.register("QwenExplicitTokenizer", slow_tokenizer_class=None, fast_tokenizer_class=QwenExplicitTokenizer)
|
| 372 |
+
|
| 373 |
+
if __name__ == "__main__":
|
| 374 |
+
# Example usage
|
| 375 |
+
# for first load
|
| 376 |
+
custom_tokenizer = QwenExplicitTokenizer.from_qwen_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
|
| 377 |
+
|
| 378 |
+
# Test messages in role/content format
|
| 379 |
+
test_messages = [
|
| 380 |
+
[
|
| 381 |
+
{"role": "description", "content": "This is a test task"},
|
| 382 |
+
{"role": "input", "content": "What is 2+2?"},
|
| 383 |
+
{"role": "output", "content": "4"},
|
| 384 |
+
{"role": "input", "content": "What is 3+3?"},
|
| 385 |
+
],
|
| 386 |
+
[
|
| 387 |
+
{"role": "description", "content": "This is a test task"},
|
| 388 |
+
{"role": "output", "content": "4"},
|
| 389 |
+
{"role": "output", "content": "10"},
|
| 390 |
+
{"role": "output", "content": "13"},
|
| 391 |
+
],
|
| 392 |
+
[
|
| 393 |
+
{"role": "output", "content": "4"},
|
| 394 |
+
{"role": "output", "content": "10"},
|
| 395 |
+
{"role": "output", "content": "13"},
|
| 396 |
+
],
|
| 397 |
+
[
|
| 398 |
+
{"role": "input", "content": "What is 2+2?"},
|
| 399 |
+
{"role": "output", "content": "4"},
|
| 400 |
+
{"role": "input", "content": "What is 3+3?"},
|
| 401 |
+
{"role": "output", "content": "10"},
|
| 402 |
+
{"role": "input", "content": "What is 4+4?"},
|
| 403 |
+
],
|
| 404 |
+
]
|
| 405 |
+
for messages in test_messages:
|
| 406 |
+
# get messages to text_loss
|
| 407 |
+
texts = custom_tokenizer.messages_to_loss_texts(messages)
|
| 408 |
+
|
| 409 |
+
print("Texts with loss flags:")
|
| 410 |
+
for i, text in enumerate(texts):
|
| 411 |
+
print(f" {i}: {text}")
|
| 412 |
+
processed = custom_tokenizer.tokenize_loss_texts(texts)
|
| 413 |
+
print(f"\nProcessed:")
|
| 414 |
+
print(str(processed["input_ids"][:10]) + "..." + str(processed["input_ids"][-10:]))
|
| 415 |
+
|
| 416 |
+
text = custom_tokenizer.messages_to_text(messages, start_generation=True)
|
| 417 |
+
print(f"\nFull text with generation prompt:")
|
| 418 |
+
print(text)
|
| 419 |
+
# tokenize messages and print input_ids
|
| 420 |
+
processed = custom_tokenizer.tokenize_messages(messages, start_generation=True)
|
| 421 |
+
print(f"\nProcessed:")
|
| 422 |
+
print(str(processed["input_ids"][:10]) + "..." + str(processed["input_ids"][-10:]))
|
| 423 |
+
|
| 424 |
+
# test messages in chat format
|
| 425 |
+
test_messages = [
|
| 426 |
+
[
|
| 427 |
+
{"role": "user", "content": "What is 2+2?"},
|
| 428 |
+
{"role": "assistant", "content": "4"},
|
| 429 |
+
],
|
| 430 |
+
]
|
| 431 |
+
chat_text = custom_tokenizer.apply_chat_template(test_messages, tokenize=False)[0]
|
| 432 |
+
print(f"\nChat text:")
|
| 433 |
+
print(chat_text)
|
| 434 |
+
|
| 435 |
+
processed = custom_tokenizer.apply_chat_template(test_messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")[0]
|
| 436 |
+
print(f"\nProcessed:")
|
| 437 |
+
print(str(processed[:10]) + "..." + str(processed[-10:]))
|
| 438 |
+
|
| 439 |
+
print("\nTesting save/load cycle:")
|
| 440 |
+
# Test saving and loading
|
| 441 |
+
tokenizer_path = "repos/explicit-qwen-tokenizer"
|
| 442 |
+
custom_tokenizer.save_pretrained(tokenizer_path)
|
| 443 |
+
print("Tokenizer saved successfully!")
|
| 444 |
+
|
| 445 |
+
# also save this file in the tokenizer_path
|
| 446 |
+
import shutil
|
| 447 |
+
shutil.copy(__file__, os.path.join(tokenizer_path, "qwen_explicit_tokenizer.py"))
|
| 448 |
+
print("QwenExplicitTokenizer.py saved successfully!")
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": {
|
| 25 |
+
"content": "<|endoftext|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
}
|
| 31 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
| 3 |
+
size 11421896
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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okens_decoder": {
|
| 5 |
+
"151643": {
|
| 6 |
+
"content": "<|endoftext|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
}
|
| 181 |
+
},
|
| 182 |
+
"additional_special_tokens": [
|
| 183 |
+
"<|im_start|>",
|
| 184 |
+
"<|im_end|>",
|
| 185 |
+
"<|object_ref_start|>",
|
| 186 |
+
"<|object_ref_end|>",
|
| 187 |
+
"<|box_start|>",
|
| 188 |
+
"<|box_end|>",
|
| 189 |
+
"<|quad_start|>",
|
| 190 |
+
"<|quad_end|>",
|
| 191 |
+
"<|vision_start|>",
|
| 192 |
+
"<|vision_end|>",
|
| 193 |
+
"<|vision_pad|>",
|
| 194 |
+
"<|image_pad|>",
|
| 195 |
+
"<|video_pad|>"
|
| 196 |
+
],
|
| 197 |
+
"bos_token": null,
|
| 198 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\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 {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 199 |
+
"clean_up_tokenization_spaces": false,
|
| 200 |
+
"end_string": "<|im_end|>",
|
| 201 |
+
"eos_token": "<|im_end|>",
|
| 202 |
+
"errors": "replace",
|
| 203 |
+
"extra_special_tokens": {},
|
| 204 |
+
"model_max_length": 131072,
|
| 205 |
+
"pad_token": "<|endoftext|>",
|
| 206 |
+
"split_special_tokens": false,
|
| 207 |
+
"start_string": "<|im_start|>",
|
| 208 |
+
"tokenizer_class": "QwenExplicitTokenizer",
|
| 209 |
+
"unk_token": null,
|
| 210 |
+
"auto_map": {
|
| 211 |
+
"AutoTokenizer": [
|
| 212 |
+
"qwen_explicit_tokenizer.QwenExplicitTokenizer",
|
| 213 |
+
"qwen_explicit_tokenizer.QwenExplicitTokenizer"
|
| 214 |
+
]
|
| 215 |
+
}
|
| 216 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd3c3e79506098b312079a468a96eaee310fd7528559a43912518f666bfa0d3c
|
| 3 |
+
size 7313
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|