Upload folder using huggingface_hub
Browse files- chat_template.jinja +11 -0
- config.json +108 -0
- generation_config.json +6 -0
- model.safetensors +3 -0
- recipe.yaml +6 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '
|
| 2 |
+
|
| 3 |
+
' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '
|
| 4 |
+
' + '```json' + '
|
| 5 |
+
' + tool['function']['arguments'] + '
|
| 6 |
+
' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'
|
| 7 |
+
' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '
|
| 8 |
+
' + '```json' + '
|
| 9 |
+
' + tool['function']['arguments'] + '
|
| 10 |
+
' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{{'<|Assistant|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'
|
| 11 |
+
<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|>'}}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DeepseekV3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 1,
|
| 10 |
+
"ep_size": 1,
|
| 11 |
+
"first_k_dense_replace": 0,
|
| 12 |
+
"head_dim": 64,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 1792,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 2304,
|
| 17 |
+
"kv_lora_rank": 512,
|
| 18 |
+
"max_position_embeddings": 163840,
|
| 19 |
+
"model_type": "deepseek_v3",
|
| 20 |
+
"moe_intermediate_size": 512,
|
| 21 |
+
"moe_layer_freq": 1,
|
| 22 |
+
"n_group": 8,
|
| 23 |
+
"n_routed_experts": 256,
|
| 24 |
+
"n_shared_experts": 1,
|
| 25 |
+
"norm_topk_prob": true,
|
| 26 |
+
"num_attention_heads": 128,
|
| 27 |
+
"num_experts_per_tok": 8,
|
| 28 |
+
"num_hidden_layers": 1,
|
| 29 |
+
"num_key_value_heads": 128,
|
| 30 |
+
"num_nextn_predict_layers": 1,
|
| 31 |
+
"pretraining_tp": 1,
|
| 32 |
+
"q_lora_rank": 1536,
|
| 33 |
+
"qk_head_dim": 192,
|
| 34 |
+
"qk_nope_head_dim": 128,
|
| 35 |
+
"qk_rope_head_dim": 64,
|
| 36 |
+
"quantization_config": {
|
| 37 |
+
"config_groups": {
|
| 38 |
+
"group_0": {
|
| 39 |
+
"format": "float-quantized",
|
| 40 |
+
"input_activations": {
|
| 41 |
+
"actorder": null,
|
| 42 |
+
"block_structure": null,
|
| 43 |
+
"dynamic": true,
|
| 44 |
+
"group_size": null,
|
| 45 |
+
"num_bits": 8,
|
| 46 |
+
"observer": null,
|
| 47 |
+
"observer_kwargs": {},
|
| 48 |
+
"scale_dtype": null,
|
| 49 |
+
"strategy": "token",
|
| 50 |
+
"symmetric": true,
|
| 51 |
+
"type": "float",
|
| 52 |
+
"zp_dtype": null
|
| 53 |
+
},
|
| 54 |
+
"output_activations": null,
|
| 55 |
+
"targets": [
|
| 56 |
+
"Linear"
|
| 57 |
+
],
|
| 58 |
+
"weights": {
|
| 59 |
+
"actorder": null,
|
| 60 |
+
"block_structure": null,
|
| 61 |
+
"dynamic": false,
|
| 62 |
+
"group_size": null,
|
| 63 |
+
"num_bits": 8,
|
| 64 |
+
"observer": "minmax",
|
| 65 |
+
"observer_kwargs": {},
|
| 66 |
+
"scale_dtype": null,
|
| 67 |
+
"strategy": "channel",
|
| 68 |
+
"symmetric": true,
|
| 69 |
+
"type": "float",
|
| 70 |
+
"zp_dtype": null
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
},
|
| 74 |
+
"format": "float-quantized",
|
| 75 |
+
"global_compression_ratio": null,
|
| 76 |
+
"ignore": [
|
| 77 |
+
"lm_head"
|
| 78 |
+
],
|
| 79 |
+
"kv_cache_scheme": null,
|
| 80 |
+
"quant_method": "compressed-tensors",
|
| 81 |
+
"quantization_status": "compressed",
|
| 82 |
+
"sparsity_config": {},
|
| 83 |
+
"transform_config": {},
|
| 84 |
+
"version": "0.13.1.dev0+g797d301.d20251217"
|
| 85 |
+
},
|
| 86 |
+
"rms_norm_eps": 1e-06,
|
| 87 |
+
"rope_interleave": true,
|
| 88 |
+
"rope_scaling": {
|
| 89 |
+
"beta_fast": 32.0,
|
| 90 |
+
"beta_slow": 1.0,
|
| 91 |
+
"factor": 40.0,
|
| 92 |
+
"mscale": 1.0,
|
| 93 |
+
"mscale_all_dim": 1.0,
|
| 94 |
+
"original_max_position_embeddings": 4096,
|
| 95 |
+
"rope_type": "yarn",
|
| 96 |
+
"type": "yarn"
|
| 97 |
+
},
|
| 98 |
+
"rope_theta": 10000,
|
| 99 |
+
"routed_scaling_factor": 2.5,
|
| 100 |
+
"scoring_func": "sigmoid",
|
| 101 |
+
"tie_word_embeddings": false,
|
| 102 |
+
"topk_group": 4,
|
| 103 |
+
"topk_method": "noaux_tc",
|
| 104 |
+
"transformers_version": "4.57.0",
|
| 105 |
+
"use_cache": true,
|
| 106 |
+
"v_head_dim": 128,
|
| 107 |
+
"vocab_size": 128000
|
| 108 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 1,
|
| 5 |
+
"transformers_version": "4.57.0"
|
| 6 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:895e0c480f3ee073f5ee587a06a525a309c0a32c12dd5c4851b0ffafcf8f0e61
|
| 3 |
+
size 1715269632
|
recipe.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
QuantizationModifier:
|
| 4 |
+
targets: [Linear]
|
| 5 |
+
ignore: [lm_head]
|
| 6 |
+
scheme: FP8_DYNAMIC
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|begin▁of▁sentence|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|end▁of▁sentence|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|end▁of▁sentence|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|