Upload folder using huggingface_hub
Browse files- .gitattributes +4 -0
- chat_template.jinja +7 -0
- config.json +80 -0
- generation_config.json +7 -0
- onnx/model.onnx +3 -0
- onnx/model.onnx_data +3 -0
- onnx/model_fp16.onnx +3 -0
- onnx/model_fp16.onnx_data +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4.onnx_data +3 -0
- onnx/model_q8.onnx +3 -0
- onnx/model_q8.onnx_data +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +21 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ 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 |
+
onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
onnx/model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
onnx/model_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
onnx/model_q8.onnx_data filter=lfs diff=lfs merge=lfs -text
|
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,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Lfm2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"block_auto_adjust_ff_dim": false,
|
| 6 |
+
"block_dim": 2048,
|
| 7 |
+
"block_ff_dim": 10752,
|
| 8 |
+
"block_ffn_dim_multiplier": 1.0,
|
| 9 |
+
"block_mlp_init_scale": 1.0,
|
| 10 |
+
"block_multiple_of": 256,
|
| 11 |
+
"block_norm_eps": 1e-05,
|
| 12 |
+
"block_out_init_scale": 1.0,
|
| 13 |
+
"block_use_swiglu": true,
|
| 14 |
+
"block_use_xavier_init": true,
|
| 15 |
+
"bos_token_id": 1,
|
| 16 |
+
"conv_L_cache": 3,
|
| 17 |
+
"conv_bias": false,
|
| 18 |
+
"conv_dim": 2048,
|
| 19 |
+
"conv_use_xavier_init": true,
|
| 20 |
+
"dtype": "bfloat16",
|
| 21 |
+
"eos_token_id": 7,
|
| 22 |
+
"hidden_size": 2048,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 10752,
|
| 25 |
+
"layer_types": [
|
| 26 |
+
"conv",
|
| 27 |
+
"conv",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"conv",
|
| 30 |
+
"conv",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"conv",
|
| 33 |
+
"conv",
|
| 34 |
+
"conv",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"conv",
|
| 37 |
+
"conv",
|
| 38 |
+
"conv",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"conv",
|
| 41 |
+
"conv",
|
| 42 |
+
"conv",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"conv",
|
| 45 |
+
"conv",
|
| 46 |
+
"conv",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"conv",
|
| 49 |
+
"conv",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"conv",
|
| 52 |
+
"conv",
|
| 53 |
+
"full_attention",
|
| 54 |
+
"conv",
|
| 55 |
+
"conv"
|
| 56 |
+
],
|
| 57 |
+
"max_position_embeddings": 128000,
|
| 58 |
+
"model_type": "lfm2",
|
| 59 |
+
"norm_eps": 1e-05,
|
| 60 |
+
"num_attention_heads": 32,
|
| 61 |
+
"num_heads": 32,
|
| 62 |
+
"num_hidden_layers": 30,
|
| 63 |
+
"num_key_value_heads": 8,
|
| 64 |
+
"pad_token_id": 0,
|
| 65 |
+
"rope_parameters": {
|
| 66 |
+
"rope_theta": 1000000.0,
|
| 67 |
+
"rope_type": "default"
|
| 68 |
+
},
|
| 69 |
+
"tie_embedding": true,
|
| 70 |
+
"transformers_version": "5.0.0.dev0",
|
| 71 |
+
"use_cache": true,
|
| 72 |
+
"use_pos_enc": true,
|
| 73 |
+
"vocab_size": 65536,
|
| 74 |
+
"transformers.js_config": {
|
| 75 |
+
"kv_cache_dtype": {
|
| 76 |
+
"fp32": "float32"
|
| 77 |
+
},
|
| 78 |
+
"use_external_data_format": true
|
| 79 |
+
}
|
| 80 |
+
}
|
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": "4.54.0"
|
| 7 |
+
}
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56d24d977c41f05493e10fd6356d7ec1cd5c21789e8644d95eb32236c88edc52
|
| 3 |
+
size 176324
|
onnx/model.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:488d7162ebca458b56ebdef1c32d311c9c7f2e8263b1f11649f4ea48a3c77958
|
| 3 |
+
size 10309853184
|
onnx/model_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79cfc00bd379e7bdeda8c4bf1a2f48e99d25f73414f81dfdf93c1450644e1484
|
| 3 |
+
size 186864
|
onnx/model_fp16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f6bcfe797311705c821470bd015c2d8e53eee7df6fc193e67fbaf1f64a1f17f
|
| 3 |
+
size 5154926592
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b99609760e3f0afd6e0667e0ba7a4219fc1c8ff8ef3d245e644707ffb4bdf4b3
|
| 3 |
+
size 226401
|
onnx/model_q4.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5748c9d723a001a00f0f4267f051eaf8128bb7663bbf701886a144005608bc70
|
| 3 |
+
size 2092425216
|
onnx/model_q8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7763adbf92cb059ed4612a3729636936371325769f1f9c3f759f0b11c125ed9
|
| 3 |
+
size 254873
|
onnx/model_q8.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7a9448ffb8ddd0e8655111689c6f1e31d415e0c0cd77f0c7b047c2fb82da5aa
|
| 3 |
+
size 3385909248
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"model_specific_special_tokens": {},
|
| 14 |
+
"pad_token": "<|pad|>",
|
| 15 |
+
"sp_model_kwargs": {},
|
| 16 |
+
"spaces_between_special_tokens": false,
|
| 17 |
+
"tokenizer_class": "TokenizersBackend",
|
| 18 |
+
"use_default_system_prompt": false,
|
| 19 |
+
"use_fast": true,
|
| 20 |
+
"chat_template": "{{- 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 + (\"\n\" 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\n\" + ns.system_prompt + \"<|im_end|>\n\" -}}{%- endif -%}{%- for message in messages -%} {{- \"<|im_start|>\" + message[\"role\"] + \"\n\" -}} {%- 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|>\n\" -}}{%- endfor -%}{%- if add_generation_prompt -%} {{- \"<|im_start|>assistant\n\" -}}{%- endif -%}"
|
| 21 |
+
}
|