Ben Graville commited on
Add lfm2_5_2_6b_decode_int8hu_block32_sym_mf64
Browse files- .gitattributes +2 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/main.hash +1 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/main.mlirb +3 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/metadata.json +5 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/metadata.json +29 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/chat_template.jinja +125 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/generation_config.json +16 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/tokenizer.json +3 -0
- gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/tokenizer_config.json +13 -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 |
+
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
�#�ݨa}W��e'� �����j5�F|3�H�E
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd1323f28ddda8617d579dbe6527d209a7a491b415dc6a359f467c339148a145
|
| 3 |
+
size 3637330982
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"assetVersion" : "2.0",
|
| 3 |
+
"producer" : "coreai-core 1.0.0b2",
|
| 4 |
+
"creationDate" : "20260817T111106Z"
|
| 5 |
+
}
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/metadata.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata_version": "0.2",
|
| 3 |
+
"kind": "llm",
|
| 4 |
+
"name": "lfm2_5_2_6b_decode_int8hu_block32_sym_mf64",
|
| 5 |
+
"assets": {
|
| 6 |
+
"main": "lfm2_5_2_6b_decode_int8hu_block32_sym_mf64.aimodel"
|
| 7 |
+
},
|
| 8 |
+
"language": {
|
| 9 |
+
"tokenizer": "LiquidAI/LFM2.5-2.6B",
|
| 10 |
+
"vocab_size": 128000,
|
| 11 |
+
"max_context_length": 4096,
|
| 12 |
+
"embedded_tokenizer": true,
|
| 13 |
+
"function_map": {
|
| 14 |
+
"main": [
|
| 15 |
+
"main",
|
| 16 |
+
"prefill"
|
| 17 |
+
]
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"source": {
|
| 21 |
+
"model_definition": "torch",
|
| 22 |
+
"hf_model_id": "LiquidAI/LFM2.5-2.6B"
|
| 23 |
+
},
|
| 24 |
+
"compression": null,
|
| 25 |
+
"compilation": {
|
| 26 |
+
"date": "2026-08-17T11:11:09.411576+00:00",
|
| 27 |
+
"targets": []
|
| 28 |
+
}
|
| 29 |
+
}
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/chat_template.jinja
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- bos_token -}}
|
| 2 |
+
{%- set preserve_thinking = preserve_thinking | default(false) -%}
|
| 3 |
+
|
| 4 |
+
{%- macro format_arg_value(arg_value) -%}
|
| 5 |
+
{%- if arg_value is string -%}
|
| 6 |
+
{{- "'" + (arg_value | replace("\\", "\\\\") | replace("'", "\\'") | replace("\n", "\\n") | replace("\r", "\\r")) + "'" -}}
|
| 7 |
+
{%- elif arg_value is mapping or arg_value is iterable -%}
|
| 8 |
+
{{- arg_value | tojson -}}
|
| 9 |
+
{%- else -%}
|
| 10 |
+
{{- arg_value | string -}}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- endmacro -%}
|
| 13 |
+
|
| 14 |
+
{%- macro parse_content(content) -%}
|
| 15 |
+
{%- if content is string -%}
|
| 16 |
+
{{- content -}}
|
| 17 |
+
{%- elif content is mapping -%}
|
| 18 |
+
{{- content | tojson -}}
|
| 19 |
+
{%- elif content is iterable -%}
|
| 20 |
+
{%- set _ns = namespace(result="") -%}
|
| 21 |
+
{%- for item in content -%}
|
| 22 |
+
{%- if item is string -%}
|
| 23 |
+
{%- set _ns.result = _ns.result + item -%}
|
| 24 |
+
{%- elif item is mapping and item.get("type") == "image" -%}
|
| 25 |
+
{%- set _ns.result = _ns.result + "<image>" -%}
|
| 26 |
+
{%- elif item is mapping and item.get("type") == "text" -%}
|
| 27 |
+
{%- set _ns.result = _ns.result + ((item.get("text") or "") | string) -%}
|
| 28 |
+
{%- else -%}
|
| 29 |
+
{%- set _ns.result = _ns.result + (item | tojson) -%}
|
| 30 |
+
{%- endif -%}
|
| 31 |
+
{%- endfor -%}
|
| 32 |
+
{{- _ns.result -}}
|
| 33 |
+
{%- endif -%}
|
| 34 |
+
{%- endmacro -%}
|
| 35 |
+
|
| 36 |
+
{%- macro render_tool_calls(tool_calls) -%}
|
| 37 |
+
{%- set tool_calls_ns = namespace(tool_calls=[]) -%}
|
| 38 |
+
{%- for tool_call in tool_calls -%}
|
| 39 |
+
{%- set func = tool_call["function"] if "function" in tool_call else tool_call -%}
|
| 40 |
+
{%- set func_name = func["name"] -%}
|
| 41 |
+
{%- set func_args = func.get("arguments") -%}
|
| 42 |
+
{%- set args_ns = namespace(arg_strings=[]) -%}
|
| 43 |
+
{%- if func_args is mapping -%}
|
| 44 |
+
{%- for arg_name, arg_value in func_args.items() -%}
|
| 45 |
+
{%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + "=" + format_arg_value(arg_value)] -%}
|
| 46 |
+
{%- endfor -%}
|
| 47 |
+
{%- elif func_args is string and (func_args | trim) not in ["", "{}", "null"] -%}
|
| 48 |
+
{{- raise_exception("Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template") -}}
|
| 49 |
+
{%- endif -%}
|
| 50 |
+
{%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + "(" + (args_ns.arg_strings | join(", ")) + ")"] -%}
|
| 51 |
+
{%- endfor -%}
|
| 52 |
+
{{- "<|tool_call_start|>[" + (tool_calls_ns.tool_calls | join(", ")) + "]<|tool_call_end|>" -}}
|
| 53 |
+
{%- endmacro -%}
|
| 54 |
+
|
| 55 |
+
{%- set ns = namespace(system_prompt="", last_user_index=-1) -%}
|
| 56 |
+
{%- if messages and messages[0]["role"] == "system" -%}
|
| 57 |
+
{%- if messages[0].get("content") -%}
|
| 58 |
+
{%- set ns.system_prompt = parse_content(messages[0]["content"]) -%}
|
| 59 |
+
{%- endif -%}
|
| 60 |
+
{%- set messages = messages[1:] -%}
|
| 61 |
+
{%- endif -%}
|
| 62 |
+
{%- if tools -%}
|
| 63 |
+
{%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: [" -%}
|
| 64 |
+
{%- for tool in tools -%}
|
| 65 |
+
{%- if tool is not string -%}
|
| 66 |
+
{%- set tool = tool | tojson -%}
|
| 67 |
+
{%- endif -%}
|
| 68 |
+
{%- set ns.system_prompt = ns.system_prompt + tool -%}
|
| 69 |
+
{%- if not loop.last -%}
|
| 70 |
+
{%- set ns.system_prompt = ns.system_prompt + ", " -%}
|
| 71 |
+
{%- endif -%}
|
| 72 |
+
{%- endfor -%}
|
| 73 |
+
{%- set ns.system_prompt = ns.system_prompt + "]" -%}
|
| 74 |
+
{%- endif -%}
|
| 75 |
+
{%- if ns.system_prompt -%}
|
| 76 |
+
{{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
|
| 77 |
+
{%- endif -%}
|
| 78 |
+
{%- for message in messages -%}
|
| 79 |
+
{%- if message["role"] == "user" -%}
|
| 80 |
+
{%- set ns.last_user_index = loop.index0 -%}
|
| 81 |
+
{%- endif -%}
|
| 82 |
+
{%- endfor -%}
|
| 83 |
+
{%- for message in messages -%}
|
| 84 |
+
{{- "<|im_start|>" + message.role + "\n" -}}
|
| 85 |
+
{%- if message.role == "assistant" -%}
|
| 86 |
+
{%- generation -%}
|
| 87 |
+
{%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}
|
| 88 |
+
{%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}
|
| 89 |
+
{%- set thinking = thinking if thinking is string else "" -%}
|
| 90 |
+
{%- if thinking and keep_thinking -%}
|
| 91 |
+
{{- "<think>" + thinking + "</think>" -}}
|
| 92 |
+
{%- endif -%}
|
| 93 |
+
{%- set _cfm_tag = "CONTINUE_FINAL_MESSAGE_TAG " -%}
|
| 94 |
+
{%- set _has_cfm = false -%}
|
| 95 |
+
{%- set content = "" -%}
|
| 96 |
+
{%- if message.get("content") -%}
|
| 97 |
+
{%- set content = parse_content(message.content) -%}
|
| 98 |
+
{%- endif -%}
|
| 99 |
+
{%- if not keep_thinking and "</think>" in content -%}
|
| 100 |
+
{%- set content = content.split("</think>")[-1] | trim -%}
|
| 101 |
+
{%- endif -%}
|
| 102 |
+
{%- if content.endswith(_cfm_tag) -%}
|
| 103 |
+
{%- set _has_cfm = true -%}
|
| 104 |
+
{%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}
|
| 105 |
+
{%- set content = content[:_trunc_len] -%}
|
| 106 |
+
{%- endif -%}
|
| 107 |
+
{{- content -}}
|
| 108 |
+
{%- if message.tool_calls -%}
|
| 109 |
+
{{- render_tool_calls(message.tool_calls) -}}
|
| 110 |
+
{%- endif -%}
|
| 111 |
+
{%- if _has_cfm -%}
|
| 112 |
+
{{- _cfm_tag -}}
|
| 113 |
+
{%- endif -%}
|
| 114 |
+
{{- "<|im_end|>\n" -}}
|
| 115 |
+
{%- endgeneration -%}
|
| 116 |
+
{%- else %}
|
| 117 |
+
{%- if message.get("content") -%}
|
| 118 |
+
{{- parse_content(message["content"]) -}}
|
| 119 |
+
{%- endif -%}
|
| 120 |
+
{{- "<|im_end|>\n" -}}
|
| 121 |
+
{%- endif %}
|
| 122 |
+
{%- endfor -%}
|
| 123 |
+
{%- if add_generation_prompt -%}
|
| 124 |
+
{{- "<|im_start|>assistant\n<think>" -}}
|
| 125 |
+
{%- endif -%}
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/generation_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 124894,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
124900
|
| 6 |
+
],
|
| 7 |
+
"output_attentions": false,
|
| 8 |
+
"output_hidden_states": false,
|
| 9 |
+
"pad_token_id": 124893,
|
| 10 |
+
"temperature": 0.1,
|
| 11 |
+
"do_sample": true,
|
| 12 |
+
"top_k": 50,
|
| 13 |
+
"repetition_penalty": 1.1,
|
| 14 |
+
"transformers_version": "5.2.0",
|
| 15 |
+
"use_cache": true
|
| 16 |
+
}
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:695be7802a0e4b8a81048f0ff5ebb7fc811a0ba5a6be63dbb24deb5a81096f41
|
| 3 |
+
size 17905598
|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym_mf64/tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"local_files_only": false,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": "<|pad|>",
|
| 11 |
+
"tokenizer_class": "TokenizersBackend",
|
| 12 |
+
"use_default_system_prompt": false
|
| 13 |
+
}
|