black279 commited on
Commit
9ef6aeb
·
verified ·
1 Parent(s): e78bbf6

Upload folder using huggingface_hub

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\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>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\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" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json CHANGED
@@ -1,24 +1,81 @@
1
  {
2
- "model_type": "qwen2_5",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
6
- "auto_map": {
7
- "AutoConfig": "qwen2_5.configuration_qwen2_5.Qwen2Config",
8
- "AutoModelForCausalLM": "qwen2_5.modeling_qwen2_5.Qwen2ForCausalLM",
9
- "AutoTokenizer": "qwen2_5.tokenization_qwen2_5.Qwen2Tokenizer"
10
- },
11
- "bos_token_id": null,
12
  "eos_token_id": 151643,
13
- "pad_token_id": 151654,
14
- "model_max_length": 32768,
15
- "vocab_size": 151664,
16
- "hidden_size": 1024,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  "num_hidden_layers": 24,
18
- "num_attention_heads": 16,
19
- "intermediate_size": 2752,
20
- "rms_norm_eps": 1e-6,
21
- "rope_theta": 100000,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "tie_word_embeddings": true,
23
- "torch_dtype": "float16"
 
 
 
 
 
24
  }
 
1
  {
 
2
  "architectures": [
3
  "Qwen2ForCausalLM"
4
  ],
5
+ "attention_dropout": 0.0,
6
+ "dtype": "float16",
 
 
 
 
7
  "eos_token_id": 151643,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 896,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 4864,
12
+ "layer_types": [
13
+ "full_attention",
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention"
37
+ ],
38
+ "max_position_embeddings": 32768,
39
+ "max_window_layers": 24,
40
+ "model_type": "qwen2",
41
+ "num_attention_heads": 14,
42
  "num_hidden_layers": 24,
43
+ "num_key_value_heads": 2,
44
+ "pad_token_id": 151654,
45
+ "quantization_config": {
46
+ "_load_in_4bit": true,
47
+ "_load_in_8bit": false,
48
+ "bnb_4bit_compute_dtype": "bfloat16",
49
+ "bnb_4bit_quant_storage": "uint8",
50
+ "bnb_4bit_quant_type": "nf4",
51
+ "bnb_4bit_use_double_quant": true,
52
+ "llm_int8_enable_fp32_cpu_offload": false,
53
+ "llm_int8_has_fp16_weight": false,
54
+ "llm_int8_skip_modules": [
55
+ "lm_head",
56
+ "multi_modal_projector",
57
+ "merger",
58
+ "modality_projection",
59
+ "model.layers.2.mlp",
60
+ "model.layers.3.mlp",
61
+ "model.layers.6.self_attn",
62
+ "model.layers.21.mlp",
63
+ "model.layers.0.self_attn"
64
+ ],
65
+ "llm_int8_threshold": 6.0,
66
+ "load_in_4bit": true,
67
+ "load_in_8bit": false,
68
+ "quant_method": "bitsandbytes"
69
+ },
70
+ "rms_norm_eps": 1e-06,
71
+ "rope_scaling": null,
72
+ "rope_theta": 1000000.0,
73
+ "sliding_window": null,
74
  "tie_word_embeddings": true,
75
+ "transformers_version": "4.57.1",
76
+ "unsloth_fixed": true,
77
+ "use_cache": true,
78
+ "use_mrope": false,
79
+ "use_sliding_window": false,
80
+ "vocab_size": 151936
81
  }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "eos_token_id": 151643,
4
+ "max_length": 32768,
5
+ "max_new_tokens": 2048,
6
+ "pad_token_id": 151654,
7
+ "transformers_version": "4.57.1"
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcc6ef8f4d1ad1b399742c1b047ce5dd9285c11025b9c02f3d222574916d24ea
3
+ size 520974434
special_tokens_map.json CHANGED
@@ -22,7 +22,7 @@
22
  "single_word": false
23
  },
24
  "pad_token": {
25
- "content": "<|vision_pad|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
 
22
  "single_word": false
23
  },
24
  "pad_token": {
25
+ "content": "<|endoftext|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
tokenizer_config.json CHANGED
@@ -199,9 +199,8 @@
199
  "eos_token": "<|endoftext|>",
200
  "errors": "replace",
201
  "extra_special_tokens": {},
202
- "model_max_length": 32768,
203
- "pad_token": "<|vision_pad|>",
204
- "padding_side": "right",
205
  "split_special_tokens": false,
206
  "tokenizer_class": "Qwen2Tokenizer",
207
  "unk_token": null
 
199
  "eos_token": "<|endoftext|>",
200
  "errors": "replace",
201
  "extra_special_tokens": {},
202
+ "model_max_length": 131072,
203
+ "pad_token": "<|endoftext|>",
 
204
  "split_special_tokens": false,
205
  "tokenizer_class": "Qwen2Tokenizer",
206
  "unk_token": null