Safetensors BF16 Master Copy Deployment
Browse files- chat_template.jinja +7 -0
- config.json +61 -0
- generation_config.json +7 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +19 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- bos_token -}}{%- set system_prompt = "" -%}{%- set ns = namespace(system_prompt="") -%}{%- if messages[0]["role"] == "system" -%} {%- set ns.system_prompt = messages[0]["content"] -%} {%- set messages = messages[1:] -%}{%- endif -%}{%- if tools -%} {%- set ns.system_prompt = ns.system_prompt + ("
|
| 2 |
+
" if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%} {%- for tool in tools -%} {%- if tool is not string -%} {%- set tool = tool | tojson -%} {%- endif -%} {%- set ns.system_prompt = ns.system_prompt + tool -%} {%- if not loop.last -%} {%- set ns.system_prompt = ns.system_prompt + ", " -%} {%- endif -%} {%- endfor -%} {%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}{%- endif -%}{%- if ns.system_prompt -%} {{- "<|im_start|>system
|
| 3 |
+
" + ns.system_prompt + "<|im_end|>
|
| 4 |
+
" -}}{%- endif -%}{%- for message in messages -%} {{- "<|im_start|>" + message["role"] + "
|
| 5 |
+
" -}} {%- set content = message["content"] -%} {%- if content is not string -%} {%- set content = content | tojson -%} {%- endif -%} {%- if message["role"] == "tool" -%} {%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%} {%- endif -%} {{- content + "<|im_end|>
|
| 6 |
+
" -}}{%- endfor -%}{%- if add_generation_prompt -%} {{- "<|im_start|>assistant
|
| 7 |
+
" -}}{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Lfm2MoeForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 1,
|
| 6 |
+
"conv_L_cache": 3,
|
| 7 |
+
"conv_bias": false,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 7,
|
| 10 |
+
"hidden_size": 2048,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 7168,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"conv",
|
| 15 |
+
"conv",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"conv",
|
| 18 |
+
"conv",
|
| 19 |
+
"conv",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"conv",
|
| 22 |
+
"conv",
|
| 23 |
+
"conv",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"conv",
|
| 26 |
+
"conv",
|
| 27 |
+
"conv",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"conv",
|
| 30 |
+
"conv",
|
| 31 |
+
"conv",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"conv",
|
| 34 |
+
"conv",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"conv",
|
| 37 |
+
"conv"
|
| 38 |
+
],
|
| 39 |
+
"max_position_embeddings": 128000,
|
| 40 |
+
"model_type": "lfm2_moe",
|
| 41 |
+
"moe_intermediate_size": 1792,
|
| 42 |
+
"norm_eps": 1e-05,
|
| 43 |
+
"norm_topk_prob": true,
|
| 44 |
+
"num_attention_heads": 32,
|
| 45 |
+
"num_dense_layers": 2,
|
| 46 |
+
"num_experts": 32,
|
| 47 |
+
"num_experts_per_tok": 4,
|
| 48 |
+
"num_hidden_layers": 24,
|
| 49 |
+
"num_key_value_heads": 8,
|
| 50 |
+
"pad_token_id": 0,
|
| 51 |
+
"rope_parameters": {
|
| 52 |
+
"rope_theta": 1000000.0,
|
| 53 |
+
"rope_type": "default"
|
| 54 |
+
},
|
| 55 |
+
"routed_scaling_factor": 1.0,
|
| 56 |
+
"tie_word_embeddings": true,
|
| 57 |
+
"transformers_version": "5.0.1.dev0",
|
| 58 |
+
"use_cache": true,
|
| 59 |
+
"use_expert_bias": true,
|
| 60 |
+
"vocab_size": 65536
|
| 61 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 7,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "5.0.1.dev0"
|
| 7 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:218abf5b5ca366373b45d2790989fd938883ed1169883dcd1ed11a585ad2dd2a
|
| 3 |
+
size 16680154224
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|startoftext|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|im_end|>",
|
| 6 |
+
"is_local": true,
|
| 7 |
+
"legacy": false,
|
| 8 |
+
"model_input_names": [
|
| 9 |
+
"input_ids",
|
| 10 |
+
"attention_mask"
|
| 11 |
+
],
|
| 12 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
+
"pad_token": "<|pad|>",
|
| 14 |
+
"sp_model_kwargs": {},
|
| 15 |
+
"spaces_between_special_tokens": false,
|
| 16 |
+
"tokenizer_class": "TokenizersBackend",
|
| 17 |
+
"use_default_system_prompt": false,
|
| 18 |
+
"use_fast": true
|
| 19 |
+
}
|