Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- README.md +14 -0
- config.json +10 -0
- export_args.json +42 -0
- llm.mnn +3 -0
- llm.mnn.json +0 -0
- llm.mnn.weight +3 -0
- llm_config.json +17 -0
- tokenizer.txt +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ 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 |
+
llm.mnn filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
llm.mnn.weight filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model: janhq/Jan-v3-4B-base-instruct
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
library_name: mnn
|
| 8 |
+
tags:
|
| 9 |
+
- code
|
| 10 |
+
- mnn
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
This model [DeProgrammer/Jan-v3-4B-base-instruct-MNN](https://huggingface.co/DeProgrammer/Jan-v3-4B-base-instruct-MNN) was
|
| 14 |
+
converted to MNN format from [janhq/Jan-v3-4B-base-instruct](https://huggingface.co/janhq/Jan-v3-4B-base-instruct)
|
| 15 |
+
using [llmexport.py](https://github.com/alibaba/MNN/issues/4153#issuecomment-3866182869) in [MNN version **3.4.0**](https://github.com/alibaba/MNN/commit/a874b302f094599e2838a9186e5ce2cf6a81a7a7).
|
| 16 |
+
|
| 17 |
+
Inference can be run via MNN, e.g., MNN Chat on Android.
|
config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"llm_model": "llm.mnn",
|
| 3 |
+
"llm_weight": "llm.mnn.weight",
|
| 4 |
+
"backend_type": "cpu",
|
| 5 |
+
"thread_num": 4,
|
| 6 |
+
"precision": "low",
|
| 7 |
+
"memory": "low",
|
| 8 |
+
"sampler_type": "penalty",
|
| 9 |
+
"penalty": 1.1
|
| 10 |
+
}
|
export_args.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"path": "/home/depro/.cache/huggingface/hub/models--janhq--Jan-v3-4B-base-instruct/snapshots/f331713ecaef85c9da95fe5b63131ddb0b8c6744",
|
| 3 |
+
"type": null,
|
| 4 |
+
"tokenizer_path": "/home/depro/.cache/huggingface/hub/models--janhq--Jan-v3-4B-base-instruct/snapshots/f331713ecaef85c9da95fe5b63131ddb0b8c6744",
|
| 5 |
+
"eagle_path": null,
|
| 6 |
+
"lora_path": null,
|
| 7 |
+
"gptq_path": null,
|
| 8 |
+
"dst_path": "./model",
|
| 9 |
+
"verbose": false,
|
| 10 |
+
"test": null,
|
| 11 |
+
"export": "mnn",
|
| 12 |
+
"onnx_slim": false,
|
| 13 |
+
"quant_bit": 4,
|
| 14 |
+
"quant_block": 64,
|
| 15 |
+
"visual_quant_bit": null,
|
| 16 |
+
"visual_quant_block": null,
|
| 17 |
+
"lm_quant_bit": 4,
|
| 18 |
+
"lm_quant_block": 64,
|
| 19 |
+
"mnnconvert": "../../../build/MNNConvert",
|
| 20 |
+
"ppl": false,
|
| 21 |
+
"awq": false,
|
| 22 |
+
"hqq": false,
|
| 23 |
+
"omni": false,
|
| 24 |
+
"transformer_fuse": false,
|
| 25 |
+
"group_conv_native": false,
|
| 26 |
+
"smooth": false,
|
| 27 |
+
"sym": false,
|
| 28 |
+
"visual_sym": false,
|
| 29 |
+
"seperate_embed": false,
|
| 30 |
+
"lora_split": false,
|
| 31 |
+
"calib_data": null,
|
| 32 |
+
"act_bit": 16,
|
| 33 |
+
"embed_bit": 16,
|
| 34 |
+
"act_sym": false,
|
| 35 |
+
"quant_config": null,
|
| 36 |
+
"generate_for_npu": false,
|
| 37 |
+
"skip_weight": false,
|
| 38 |
+
"omni_epochs": 20,
|
| 39 |
+
"omni_lr": 0.005,
|
| 40 |
+
"omni_wd": 0.0001,
|
| 41 |
+
"tie_word_embeddings": true
|
| 42 |
+
}
|
llm.mnn
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e7c9a6f2174f7689f0895815674df34c5cb6504056060c7f7b228996f1a821b
|
| 3 |
+
size 646904
|
llm.mnn.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
llm.mnn.weight
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f2f06f5e0dcbebd64906ad48467f9a38f3e546ff3dd29459f2eda5dc004806b4
|
| 3 |
+
size 2515494338
|
llm_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "qwen3",
|
| 3 |
+
"hidden_size": 2560,
|
| 4 |
+
"attention_mask": "float",
|
| 5 |
+
"attention_type": "full",
|
| 6 |
+
"jinja": {
|
| 7 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\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 {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- 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 %}",
|
| 8 |
+
"eos": "<|im_end|>"
|
| 9 |
+
},
|
| 10 |
+
"tie_embeddings": [
|
| 11 |
+
2272396738,
|
| 12 |
+
2466874818,
|
| 13 |
+
48619520,
|
| 14 |
+
4,
|
| 15 |
+
64
|
| 16 |
+
]
|
| 17 |
+
}
|
tokenizer.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|